-
-
Notifications
You must be signed in to change notification settings - Fork 5
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 #20 from praw-dev/callbacks
Add pre/post refresh callbacks
- Loading branch information
Showing
7 changed files
with
205 additions
and
82 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
default_language_version: | ||
python: python3.7 | ||
fail_fast: true | ||
repos: | ||
- hooks: | ||
- id: black | ||
repo: https://github.com/ambv/black | ||
rev: stable | ||
- hooks: | ||
- id: black | ||
language_version: python3 | ||
repo: https://github.com/psf/black | ||
rev: 20.8b1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,59 @@ | ||
{ | ||
"version": 1, | ||
"interactions": [ | ||
{ | ||
"request": { | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token", | ||
"body": [ | ||
[ | ||
"grant_type", | ||
"refresh_token" | ||
], | ||
[ | ||
"refresh_token", | ||
"fake_refresh_token" | ||
] | ||
], | ||
"headers": { | ||
"User-Agent": [ | ||
"asyncprawcore:test (by /u/bboe) asyncprawcore/1.4.0" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"AUTHORIZATION": [ | ||
"Basic <placeholder_auth>" | ||
] | ||
} | ||
}, | ||
"response": { | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"headers": { | ||
"Connection": "close", | ||
"Content-Length": "40", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block", | ||
"x-ua-compatible": "IE=edge", | ||
"set-cookie": "session_tracker=GTiELnoAfGihqJgp4R.0.1592045156266.Z0FBQUFBQmU1SzVra09KQmZhamhzMUh1aXdZMFNsTWJCTHJBdFR1dE9QLUdZTmpvQ1EzVXlXNmdSR3ZUQXh2dFd1MTh5Mzc2UXFleTZZV2dxWWREY0FLSU8xMWotd1JRWlpHNjA5TDl3b3VEQjNlUm5JbXVFVUdNaHVnZU5NNUNqR0o0QzFZNzRoMm0; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 13-Jun-2020 12:45:56 GMT; secure", | ||
"cache-control": "max-age=0, must-revalidate", | ||
"X-Moose": "majestic", | ||
"Accept-Ranges": "bytes", | ||
"Date": "Sat, 13 Jun 2020 10:45:56 GMT", | ||
"Via": "1.1 varnish", | ||
"X-Served-By": "cache-ams21024-AMS", | ||
"X-Cache": "MISS", | ||
"X-Cache-Hits": "0", | ||
"X-Timer": "S1592045156.171554,VS0,VE141", | ||
"Set-Cookie": "edgebucket=jg5MWvCfB9iCg5xoTg; Domain=reddit.com; Max-Age=63071999; Path=/; secure", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Server": "snooserv" | ||
}, | ||
"body": { | ||
"string": "{\"access_token\": \"fake_access_Token\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"scope\": \"submit\"}" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
} | ||
] | ||
} | ||
"interactions": [ | ||
{ | ||
"request": { | ||
"body": [ | ||
[ | ||
"grant_type", | ||
"refresh_token" | ||
], | ||
[ | ||
"refresh_token", | ||
"<REFRESH_TOKEN>" | ||
] | ||
], | ||
"headers": { | ||
"AUTHORIZATION": [ | ||
"Basic <BASIC_AUTH>" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"User-Agent": [ | ||
"asyncprawcore:test (by /u/bboe) asyncprawcore/1.5.1" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"access_token\": \"<ACCESS_TOKEN>\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"refresh_token\": \"aaaaaaa-0000000000000000000000-aaaaaaa\", \"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", | ||
"Cache-Control": "max-age=0, must-revalidate", | ||
"Connection": "close", | ||
"Content-Length": "430", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Wed, 24 Feb 2021 04:05:45 GMT", | ||
"Server": "snooserv", | ||
"Set-Cookie": "edgebucket=RJRxvqXbGD1qATlfHc; Domain=reddit.com; Max-Age=63071999; Path=/; secure", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Moose": "majestic", | ||
"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" | ||
} | ||
} | ||
], | ||
"recorded_at": "2021-02-23T22:05:45", | ||
"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
Oops, something went wrong.