-
-
Notifications
You must be signed in to change notification settings - Fork 486
Add new function for getting list of flair templates #1776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
LilSpazJoekp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start!
We'll need some tests for this and it appears that pre_push.py still needs to be ran.
Does running the mod only endpoint cause an error if the authenticated user is not a mod? If so maybe we could have the mod endpoint fallback on the new one.
The field names are different. For example in Calling it |
Ah okay, I missed that. |
LilSpazJoekp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me! I just have two tiny suggestions.
|
Thank you! 🎇 |
Currently there's no way for a non-moderator to get a list of available flair templates without an existing submission.
https://praw.readthedocs.io/en/latest/code_overview/models/submission.html#praw.models.Submission.flair
only works if you have a submission to call it on.
https://praw.readthedocs.io/en/latest/code_overview/other/subredditflair.html#praw.models.reddit.subreddit.SubredditFlair.link_templates
only works if you're a moderator.
Sometime reddit added a
is_newlinkparameter to theflairselectorendpoint so you can call it without a submission.Starting point for discussion, I'm not quite sure where this function should live or what it should be called. From a users perspective, it functions very similarly to the moderator endpoint, but it returns slightly different fields, and only the flairs the user has access to.
link_flair endpoint (mod only)
flairselector endpoint