praw-dev/praw — pull request #230 by Wiwiweb (2013-06-25 00:06:50+00:00)
Title: Select_flair API method

I added a method select_flair that calls the api /api/selectflair instead of /api/flair.
/api/select flair allows changing your own flair and your own submission's flair on subreddits that allow it.

Here is an example:
```python
r = praw.Reddit(user_agent=USER_AGENT)
r.login('SakuraiBot', PASSWORD)

id_SSB4 ='d31a17da-d4ad-11e2-a21c-12313d2c1c24'
reddit_link = '1gpsez'
submission = r.get_submission(submission_id=reddit_link)
r.select_flair(submission, id_SSB4)

id_ROB = '05208d36-05b6-11e1-b212-12313b078c81'
redditor = r.get_redditor('SakuraiBot')
r.select_flair(redditor, id_ROB, 'smashbros')
```

I tested changing my own submission flair and changing my own user flair.
I tested it on failing cases (such as another's submission, or a wrong flair_id, or a subreddit that doesn't allow self-assignment). Nothing happens of course, but Reddit doesn't throw back any error message, so we can't know it failed.
I wasn't sure what self.exert was for, so I kept it intact.

Do not hesitate to point out my mistakes, as I only had an overview of the general structure.