Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from praw-dev/invited_moderators
Add invited moderators endpoint
- Loading branch information
Showing
9 changed files
with
176 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
...s/integration/cassettes/TestSubredditRelationships.test_moderator_invited_moderators.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
{ | ||
"interactions": [ | ||
{ | ||
"request": { | ||
"body": [ | ||
[ | ||
"grant_type", | ||
"refresh_token" | ||
], | ||
[ | ||
"refresh_token", | ||
"<REFRESH_TOKEN>" | ||
] | ||
], | ||
"headers": { | ||
"AUTHORIZATION": [ | ||
"Basic <BASIC_AUTH>" | ||
], | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> Async PRAW/7.1.1.dev0 asyncprawcore/1.5.0" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"access_token\": \"<ACCESS_TOKEN>\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"scope\": \"account creddits edit flair history identity livemanage modconfig modcontributors modflair modlog modmail modothers modposts modself modtraffic modwiki mysubreddits privatemessages read report save structuredstyles submit subscribe vote wikiedit wikiread\"}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Connection": "close", | ||
"Content-Length": "370", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Mon, 18 Jan 2021 04:11:01 GMT", | ||
"Server": "snooserv", | ||
"Set-Cookie": "edgebucket=FH0aPNSSzuVo1ci6Zu; Domain=reddit.com; Max-Age=63071999; Path=/; secure", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Moose": "majestic", | ||
"cache-control": "max-age=0, must-revalidate", | ||
"x-content-type-options": "nosniff", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-xss-protection": "1; mode=block" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": null, | ||
"headers": { | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"bearer <ACCESS_TOKEN>" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> Async PRAW/7.1.1.dev0 asyncprawcore/1.5.0" | ||
] | ||
}, | ||
"method": "GET", | ||
"uri": "https://oauth.reddit.com/api/v1/<TEST_SUBREDDIT>/moderators_invited?limit=100&raw_json=1" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"after\": null, \"moderators\": {\"t2_3c96t\": {\"username\": \"DubTeeDub\", \"accountIcon\": \"https://styles.redditmedia.com/t5_21g9si/styles/profileIcon_snoo9d063b51-1bb4-4814-b3d9-b51f27626261-headshot.png?width=256\\u0026height=256\\u0026crop=256:256,smart\\u0026frame=1\\u0026s=342c612498e798627a05d5ea1cecc095c8dda841\", \"authorFlairText\": \"\", \"moddedAtUTC\": 1560998690, \"modPermissions\": {\"wiki\": true, \"all\": true, \"chat_operator\": true, \"chat_config\": true, \"posts\": true, \"access\": true, \"mail\": true, \"config\": true, \"flair\": true}, \"iconSize\": [256, 256], \"postKarma\": 697457, \"id\": \"t2_3c96t\"}}, \"moderatorIds\": [\"t2_3c96t\"], \"allUsersLoaded\": true, \"subredditId\": \"t5_3deqz\", \"before\": null}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Connection": "keep-alive", | ||
"Content-Length": "690", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Mon, 18 Jan 2021 04:11:01 GMT", | ||
"Server": "snooserv", | ||
"Set-Cookie": "csv=1; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Moose": "majestic", | ||
"cache-control": "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate", | ||
"expires": "-1", | ||
"x-content-type-options": "nosniff", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-ratelimit-remaining": "544.0", | ||
"x-ratelimit-reset": "539", | ||
"x-ratelimit-used": "56", | ||
"x-reddit-decoy-snail": "3314,900", | ||
"x-xss-protection": "1; mode=block" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://oauth.reddit.com/api/v1/<TEST_SUBREDDIT>/moderators_invited?limit=100&raw_json=1" | ||
} | ||
} | ||
], | ||
"recorded_at": "2021-01-17T22:11:01", | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters