-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for Mobile Banner uploads. (#1902)
* Added support for Mobile Banner uploads. * Update CHANGES.rst Co-authored-by: Joel Payne <15524072+LilSpazJoekp@users.noreply.github.com> (cherry picked from commit praw-dev/praw@61d4132)
- Loading branch information
1 parent
08f4012
commit 79d9351
Showing
6 changed files
with
1,092 additions
and
0 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
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
210 changes: 210 additions & 0 deletions
210
tests/integration/cassettes/TestSubredditStylesheet.test_delete_mobile_banner.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,210 @@ | ||
{ | ||
"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.6.2.dev0 asyncprawcore/2.3.0" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"access_token\": \"<ACCESS_TOKEN>\", \"token_type\": \"bearer\", \"expires_in\": 86400, \"refresh_token\": \"<REFRESH_TOKEN>\", \"scope\": \"creddits modnote modcontributors modmail modconfig subscribe structuredstyles vote wikiedit mysubreddits submit modlog modposts modflair save modothers adsconversions read privatemessages report identity livemanage account modtraffic wikiread edit modwiki modself flair history\"}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": [ | ||
"bytes" | ||
], | ||
"Cache-Control": [ | ||
"private, max-age=3600" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"Content-Length": [ | ||
"454" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=UTF-8" | ||
], | ||
"Date": [ | ||
"Fri, 09 Dec 2022 00:34:19 GMT" | ||
], | ||
"NEL": [ | ||
"{\"report_to\": \"w3-reporting-nel\", \"max_age\": 14400, \"include_subdomains\": false, \"success_fraction\": 0.2, \"failure_fraction\": 0.2}" | ||
], | ||
"Report-To": [ | ||
"{\"group\": \"w3-reporting-nel\", \"max_age\": 14400, \"include_subdomains\": true, \"endpoints\": [{ \"url\": \"https://w3-reporting-nel.reddit.com/reports\" }]}, {\"group\": \"w3-reporting\", \"max_age\": 14400, \"include_subdomains\": true, \"endpoints\": [{ \"url\": \"https://w3-reporting.reddit.com/reports\" }]}" | ||
], | ||
"Server": [ | ||
"snooserv" | ||
], | ||
"Set-Cookie": [ | ||
"edgebucket=EPDDnGPcPAp4XhPonG; Domain=reddit.com; Max-Age=63071999; Path=/; secure" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=31536000; includeSubdomains" | ||
], | ||
"Via": [ | ||
"1.1 varnish" | ||
], | ||
"X-Content-Type-Options": [ | ||
"nosniff" | ||
], | ||
"X-Frame-Options": [ | ||
"SAMEORIGIN" | ||
], | ||
"X-XSS-Protection": [ | ||
"1; mode=block" | ||
], | ||
"x-moose": [ | ||
"majestic" | ||
], | ||
"x-ratelimit-remaining": [ | ||
"299" | ||
], | ||
"x-ratelimit-reset": [ | ||
"341" | ||
], | ||
"x-ratelimit-used": [ | ||
"1" | ||
] | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": [ | ||
[ | ||
"api_type", | ||
"json" | ||
], | ||
[ | ||
"mobileBannerImage", | ||
"" | ||
] | ||
], | ||
"headers": { | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"bearer <ACCESS_TOKEN>" | ||
], | ||
"Cookie": [ | ||
"edgebucket=EPDDnGPcPAp4XhPonG" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> Async PRAW/7.6.2.dev0 asyncprawcore/2.3.0" | ||
] | ||
}, | ||
"method": "PATCH", | ||
"uri": "https://oauth.reddit.com/api/v1/structured_styles/<TEST_SUBREDDIT>?raw_json=1" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": [ | ||
"bytes" | ||
], | ||
"Cache-Control": [ | ||
"private, s-maxage=0, max-age=0, must-revalidate, no-store" | ||
], | ||
"Connection": [ | ||
"keep-alive" | ||
], | ||
"Content-Length": [ | ||
"2" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=UTF-8" | ||
], | ||
"Date": [ | ||
"Fri, 09 Dec 2022 00:34:20 GMT" | ||
], | ||
"Expires": [ | ||
"-1" | ||
], | ||
"NEL": [ | ||
"{\"report_to\": \"w3-reporting-nel\", \"max_age\": 14400, \"include_subdomains\": false, \"success_fraction\": 0.2, \"failure_fraction\": 0.2}" | ||
], | ||
"Report-To": [ | ||
"{\"group\": \"w3-reporting-nel\", \"max_age\": 14400, \"include_subdomains\": true, \"endpoints\": [{ \"url\": \"https://w3-reporting-nel.reddit.com/reports\" }]}, {\"group\": \"w3-reporting\", \"max_age\": 14400, \"include_subdomains\": true, \"endpoints\": [{ \"url\": \"https://w3-reporting.reddit.com/reports\" }]}" | ||
], | ||
"Server": [ | ||
"snooserv" | ||
], | ||
"Set-Cookie": [ | ||
"redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Mon, 08-Dec-2025 00:34:19 GMT; secure", | ||
"session_tracker=fbeimfmkbpieehfrjq.0.1670546059960.Z0FBQUFBQmprb0tNLWhSMjh0RDhyTWZUWS1pcE13TWZ4SWhFR0MtS0FMQm1Gb0djN0NfOUhEYkNHdm1nVlpjMjZRZVA3NngwMjQwTFJqeUpBYUktUFB0WVdrZk8zWm1pS2RmNEJ4djM2NEIyY29EM21GRGNmdWpabzBDajRfY1lyWHRVeFRFcm9MbGY; Domain=reddit.com; Max-Age=7199; Path=/; expires=Fri, 09-Dec-2022 02:34:20 GMT; secure" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=31536000; includeSubdomains" | ||
], | ||
"Via": [ | ||
"1.1 varnish" | ||
], | ||
"X-Content-Type-Options": [ | ||
"nosniff" | ||
], | ||
"X-Frame-Options": [ | ||
"SAMEORIGIN" | ||
], | ||
"X-XSS-Protection": [ | ||
"1; mode=block" | ||
], | ||
"x-moose": [ | ||
"majestic" | ||
], | ||
"x-ratelimit-remaining": [ | ||
"599.0" | ||
], | ||
"x-ratelimit-reset": [ | ||
"341" | ||
], | ||
"x-ratelimit-used": [ | ||
"1" | ||
], | ||
"x-ua-compatible": [ | ||
"IE=edge" | ||
] | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://oauth.reddit.com/api/v1/structured_styles/<TEST_SUBREDDIT>?raw_json=1" | ||
} | ||
} | ||
], | ||
"version": 1 | ||
} |
Oops, something went wrong.