From ac2dea6fa24561d6b31feebac1104ac6e629e08b Mon Sep 17 00:00:00 2001 From: Josh Kim Date: Thu, 23 Dec 2021 19:45:00 -0600 Subject: [PATCH] Add support to update the display layout of posts in collections (cherry picked from commit praw-dev/praw@f49d37380bb68fb033c02634e4600be98d71934f) --- AUTHORS.rst | 1 + CHANGES.rst | 2 + asyncpraw/endpoints.py | 1 + asyncpraw/models/reddit/collections.py | 27 ++ ...t_update_display_layout__empty_string.json | 307 +++++++++++++++++ ...n.test_update_display_layout__gallery.json | 308 ++++++++++++++++++ ...update_display_layout__invalid_layout.json | 308 ++++++++++++++++++ ...test_update_display_layout__lowercase.json | 308 ++++++++++++++++++ ...tion.test_update_display_layout__none.json | 304 +++++++++++++++++ ....test_update_display_layout__timeline.json | 308 ++++++++++++++++++ .../models/reddit/test_collections.py | 76 ++++- 11 files changed, 1949 insertions(+), 1 deletion(-) create mode 100644 tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__empty_string.json create mode 100644 tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__gallery.json create mode 100644 tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__invalid_layout.json create mode 100644 tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__lowercase.json create mode 100644 tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__none.json create mode 100644 tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__timeline.json diff --git a/AUTHORS.rst b/AUTHORS.rst index f470edff..55c01bba 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -84,4 +84,5 @@ Source Contributors `_ - cmays90 `@cmays90 `_ - Dio Brando `@isFakeAccount `_ +- Josh Kim `@jsk56143 `_ - Add "Name and github profile link" above this line. diff --git a/CHANGES.rst b/CHANGES.rst index 60059384..c679195a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,8 @@ Unreleased **Added** - :meth:`.pin` to manage pinned submissions on the authenticated user's profile. +- :meth:`.update_display_layout` to update the display layout of posts in a + :class:`.Collection`. **Changed** diff --git a/asyncpraw/endpoints.py b/asyncpraw/endpoints.py index 589ed78c..6772a549 100644 --- a/asyncpraw/endpoints.py +++ b/asyncpraw/endpoints.py @@ -26,6 +26,7 @@ "collection_create": "api/v1/collections/create_collection", "collection_delete": "api/v1/collections/delete_collection", "collection_desc": "api/v1/collections/update_collection_description", + "collection_layout": "api/v1/collections/update_collection_display_layout", "collection_follow": "api/v1/collections/follow_collection", "collection_remove_post": "api/v1/collections/remove_post_in_collection", "collection_reorder": "api/v1/collections/reorder_collection", diff --git a/asyncpraw/models/reddit/collections.py b/asyncpraw/models/reddit/collections.py index 6055efeb..3a275df9 100644 --- a/asyncpraw/models/reddit/collections.py +++ b/asyncpraw/models/reddit/collections.py @@ -175,6 +175,32 @@ async def update_description(self, description: str): data={"collection_id": self.collection_id, "description": description}, ) + async def update_display_layout(self, display_layout: str): + """Update the collection's display layout. + + :param display_layout: Either ``"TIMELINE"`` for events or discussions or + ``"GALLERY"`` for images or memes. Passing ``""`` or ``None`` will clear the + set layout and ``collection.display_layout`` will be ``None``, however, the + collection will appear on Reddit as if ``display_layout`` is set to + ``"TIMELINE"``. + + Example usage: + + .. code-block:: python + + subreddit = await reddit.subreddit("test") + collection = await subreddit.collections("some_uuid") + await collection.mod.update_display_layout("GALLERY") + + """ + await self._reddit.post( + API_PATH["collection_layout"], + data={ + "collection_id": self.collection_id, + "display_layout": display_layout, + }, + ) + async def update_title(self, title: str): """Update the collection's title. @@ -233,6 +259,7 @@ class Collection(RedditBase): ``collection_id`` The UUID of the collection. ``created_at_utc`` Time the collection was created, represented in `Unix Time`_. ``description`` The collection description. + ``display_layout`` The collection display layout. ``last_update_utc`` Time the collection was last updated, represented in `Unix Time`_. ``link_ids`` A ``list`` of :class:`.Submission` fullnames. diff --git a/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__empty_string.json b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__empty_string.json new file mode 100644 index 00000000..2176ffc6 --- /dev/null +++ b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__empty_string.json @@ -0,0 +1,307 @@ +{ + "interactions": [ + { + "request": { + "body": [ + [ + "grant_type", + "refresh_token" + ], + [ + "refresh_token", + "" + ] + ], + "headers": { + "AUTHORIZATION": [ + "Basic " + ], + "Accept-Encoding": [ + "identity" + ], + "Connection": [ + "close" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://www.reddit.com/api/v1/access_token" + }, + "response": { + "body": { + "string": "{\"access_token\": \"\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"refresh_token\": \"\", \"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": [ + "427" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:20:47 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "edgebucket=SwXql06fdsfv3Sqy1P; Domain=reddit.com; Max-Age=63071999; Path=/; secure" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "max-age=0, must-revalidate" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "299" + ], + "x-ratelimit-reset": [ + "553" + ], + "x-ratelimit-used": [ + "1" + ], + "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 " + ], + "Cookie": [ + "edgebucket=SwXql06fdsfv3Sqy1P" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "GET", + "uri": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + }, + "response": { + "body": { + "string": "{\"sorted_links\": {\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": 3, \"modhash\": null, \"geo_filter\": \"\", \"children\": [{\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": null}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e2k\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018413.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e2k\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e2k/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/k62e2k/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018413.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": 1554954080, \"subreddit\": \"\", \"selftext\": \"Hello peoples!\\n\\nLast week, we [asked your opinion](https://redd.it/aufll1) on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\n \\n\\nThe new rule:\\n\\n\\u003E #No Memes \\n\\u003E \\n\\u003E No memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub r/fakehistorymemes. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\n\\n##This means that all memes* now go in r/fakehistorymemes\\n^don\\u2019t ^forget ^to ^like, ^comment ^and ^subscribe!\\n\\n\\nOne thing we need to stress:\\n#There will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a ~~nasty~~ reminder to post memes in r/fakehistorymemes.\\n\\nSeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\n\\n1. It would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone's posts and all our slaves are busy doing other things.\\n2. This doesn't work for people who just view the sub through their feed as you can't sort by flair there.\\n\\nThis is where as having 2 subs allows for this functionality. \\n\\nJust to reiterate, memes now go in r/fakehistorymemes, while the OG style of post (such as those found in the top posts of all time) belong here.\\n\\n^(*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes ^please ^no and other memey things should instead be posted on r/fakehisotrymemes. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. r/fakehisotrymemes is still run by the same mod team (i.e., us)^) ^(so the rules will be similar (close to non-existent)^) ^(and we will be running similar competitions.)\\n\\nDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\n\\nThanks for being the best part of r/fakehistoryporn!\\n\\nSincerely,\\n\\n~~Meme Police~~ The r/fakehistoryporn mod team\\n\\n___\\n\\nIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the [Official Discord](https://discord.gg/vWa5BRt), [Modmail](https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn) or in the comments of this post. \\n\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [{\"e\": \"text\", \"t\": \"test\"}], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": null}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": \"\", \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_axdfp2\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_o77bz\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": \"test\", \"can_mod_post\": true, \"score\": 1, \"approved_by\": \"\", \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"post_hint\": \"self\", \"content_categories\": null, \"is_self\": true, \"mod_note\": null, \"created\": 1551739042.0, \"link_flair_type\": \"richtext\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md\\\"\\u003E\\u003Cp\\u003EHello peoples!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ELast week, we \\u003Ca href=\\\"https://redd.it/aufll1\\\"\\u003Easked your opinion\\u003C/a\\u003E on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThe new rule:\\u003C/p\\u003E\\n\\n\\u003Cblockquote\\u003E\\n\\u003Ch1\\u003ENo Memes\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ENo memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\u003C/p\\u003E\\n\\u003C/blockquote\\u003E\\n\\n\\u003Ch2\\u003EThis means that all memes* now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003Edon\\u2019t\\u003C/sup\\u003E \\u003Csup\\u003Eforget\\u003C/sup\\u003E \\u003Csup\\u003Eto\\u003C/sup\\u003E \\u003Csup\\u003Elike,\\u003C/sup\\u003E \\u003Csup\\u003Ecomment\\u003C/sup\\u003E \\u003Csup\\u003Eand\\u003C/sup\\u003E \\u003Csup\\u003Esubscribe!\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EOne thing we need to stress:\\u003C/p\\u003E\\n\\n\\u003Ch1\\u003EThere will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a \\u003Cdel\\u003Enasty\\u003C/del\\u003E reminder to post memes in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E.\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ESeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\u003C/p\\u003E\\n\\n\\u003Col\\u003E\\n\\u003Cli\\u003EIt would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone\\u0026#39;s posts and all our slaves are busy doing other things.\\u003C/li\\u003E\\n\\u003Cli\\u003EThis doesn\\u0026#39;t work for people who just view the sub through their feed as you can\\u0026#39;t sort by flair there.\\u003C/li\\u003E\\n\\u003C/ol\\u003E\\n\\n\\u003Cp\\u003EThis is where as having 2 subs allows for this functionality. \\u003C/p\\u003E\\n\\n\\u003Cp\\u003EJust to reiterate, memes now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E, while the OG style of post (such as those found in the top posts of all time) belong here.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003E*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes \\u003Csup\\u003Eplease\\u003C/sup\\u003E \\u003Csup\\u003Eno\\u003C/sup\\u003E and other memey things should instead be posted on \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E is still run by the same mod team (i.e., us\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eso the rules will be similar (close to non-existent\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eand we will be running similar competitions.\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThanks for being the best part of \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ESincerely,\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Cdel\\u003EMeme Police\\u003C/del\\u003E The \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E mod team\\u003C/p\\u003E\\n\\n\\u003Chr/\\u003E\\n\\n\\u003Cp\\u003EIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the \\u003Ca href=\\\"https://discord.gg/vWa5BRt\\\"\\u003EOfficial Discord\\u003C/a\\u003E, \\u003Ca href=\\\"https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn\\\"\\u003EModmail\\u003C/a\\u003E or in the comments of this post. \\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"likes\": true, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": false, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"preview\": {\"images\": [{\"source\": {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?auto=webp\\u0026s=ceaef94ac6b8f26b071a98866b446a4a0a567032\", \"width\": 1200, \"height\": 628}, \"resolutions\": [{\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=108\\u0026crop=smart\\u0026auto=webp\\u0026s=1dcc9ca3a866f7b4aacfadda858fab6a5652ecbf\", \"width\": 108, \"height\": 56}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=216\\u0026crop=smart\\u0026auto=webp\\u0026s=b601492d6131461f3a1d195c82753317c0082d05\", \"width\": 216, \"height\": 113}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=320\\u0026crop=smart\\u0026auto=webp\\u0026s=9df19ec5db5047dae1fadeec15b6836f38a6a917\", \"width\": 320, \"height\": 167}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=640\\u0026crop=smart\\u0026auto=webp\\u0026s=bdc6a700886d20d02dd8e29d1f5b3a721deabb4a\", \"width\": 640, \"height\": 334}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=960\\u0026crop=smart\\u0026auto=webp\\u0026s=8cab368c12c276549af3f8245418a03d27645013\", \"width\": 960, \"height\": 502}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=1080\\u0026crop=smart\\u0026auto=webp\\u0026s=07a44ca128379479601d3de5764bee14dc1b2f74\", \"width\": 1080, \"height\": 565}], \"variants\": {}, \"id\": \"ltRJIJZJxzAbU2ofId4f5xpfVwmSPFOuFlvarmLqasI\"}], \"enabled\": false}, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"link_flair_template_id\": \"94f13282-e2e8-11e8-8291-0eae4e167256\", \"can_gild\": false, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"rte_mode\": \"markdown\", \"visited\": false, \"removed_by\": null, \"subreddit_type\": \"restricted\", \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"axdfp2\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"\", \"discussion_type\": null, \"num_comments\": 1, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": true, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/axdfp2/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/axdfp2/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1551739042.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": null}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e3m\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018415.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 1, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e3m\", \"is_robot_indexable\": true, \"report_reasons\": [\"This attribute is deprecated. Please use mod_reports and user_reports instead.\"], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e3m/test/\", \"whitelist_status\": null, \"stickied\": true, \"url\": \"https://www.reddit.com/r//comments/k62e3m/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018415.0, \"num_crossposts\": 0, \"mod_reports\": [[\"No spa5\", \"\"]], \"is_video\": false}}], \"before\": null}}, \"subreddit_id\": \"t5_7ss0q\", \"description\": \"hi\", \"primary_link_id\": \"t3_k62e2k\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"display_layout\": null, \"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "20036" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:20:47 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2VfRkRuREhxcEYxR05Ja2JDMTUtVUlha3pzQzhRamd2TmJzS3NkUUVlSnlrTThseTZvZmJaRzJwWXlDQkR0VVExVVJCVVI3MmJiVnA1eUxHSnFITkd2RjJLRk9yV0tydXJkajFnSEUxcVZxd2x1aHNLenktQ1lnLVM3Z2c3dWVlaF8; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Sun, 24-Dec-2023 22:20:47 GMT; secure; SameSite=None; Secure", + "session_tracker=alifrhaiemaidhgdpo.0.1640384447243.Z0FBQUFBQmh4a2VfcjBrRmlQVFZ5a29DLVdOTG9FbG9jT1FOWlYxNG4wRVB0aTZFbmx5Wm5VV1V2UEtsWk9wSndpemw2bDhQaExrc0JJYmJFaW82WUR2amp1cEIxbVhQd1NhZXZEaUdSOEVZbDl2c0RzZWxfWmpBTTk2dFB2Vnk1MnlqN1R3TmFRYXM; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:20:47 GMT; secure; SameSite=None; Secure", + "redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Mon, 23-Dec-2024 22:20:47 GMT; secure", + "csv=2; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Vary": [ + "accept-encoding" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "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": [ + "557.0" + ], + "x-ratelimit-reset": [ + "553" + ], + "x-ratelimit-used": [ + "43" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + } + }, + { + "request": { + "body": [ + [ + "api_type", + "json" + ], + [ + "collection_id", + "3aa31024-711b-46b2-9514-3fd50619f6e8" + ], + [ + "display_layout", + "" + ] + ], + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "csv=2; edgebucket=SwXql06fdsfv3Sqy1P; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2VfRkRuREhxcEYxR05Ja2JDMTUtVUlha3pzQzhRamd2TmJzS3NkUUVlSnlrTThseTZvZmJaRzJwWXlDQkR0VVExVVJCVVI3MmJiVnA1eUxHSnFITkd2RjJLRk9yV0tydXJkajFnSEUxcVZxd2x1aHNLenktQ1lnLVM3Z2c3dWVlaF8; redesign_optout=true; session_tracker=alifrhaiemaidhgdpo.0.1640384447243.Z0FBQUFBQmh4a2VfcjBrRmlQVFZ5a29DLVdOTG9FbG9jT1FOWlYxNG4wRVB0aTZFbmx5Wm5VV1V2UEtsWk9wSndpemw2bDhQaExrc0JJYmJFaW82WUR2amp1cEIxbVhQd1NhZXZEaUdSOEVZbDl2c0RzZWxfWmpBTTk2dFB2Vnk1MnlqN1R3TmFRYXM" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + }, + "response": { + "body": { + "string": "{\"json\": {\"errors\": []}}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "24" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:20:47 GMT" + ], + "Server": [ + "snooserv" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate" + ], + "expires": [ + "-1" + ], + "set-cookie": [ + "session_tracker=alifrhaiemaidhgdpo.0.1640384447557.Z0FBQUFBQmh4a2VfLXFPLUo3bzdfMzItUDk4VEJIdkR1QUxzajNtcmN2S1NUVEttWURHdkdIaUJnU2pEdWFCOVBvVEU1V2JsRU1YLXJwelItRHNlbHlfT052cjFSMUlLMUg1aWRGdWc0OTBqOHFVQkVJX25EaXVlYzlHd05nNnQyQlItVDdHTzZ0OHk; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:20:47 GMT; secure" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "555.0" + ], + "x-ratelimit-reset": [ + "553" + ], + "x-ratelimit-used": [ + "45" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + } + } + ], + "recorded_at": "2021-12-24T16:20:47", + "version": 1 +} diff --git a/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__gallery.json b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__gallery.json new file mode 100644 index 00000000..fad3088b --- /dev/null +++ b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__gallery.json @@ -0,0 +1,308 @@ +{ + "interactions": [ + { + "request": { + "body": [ + [ + "grant_type", + "refresh_token" + ], + [ + "refresh_token", + "" + ] + ], + "headers": { + "AUTHORIZATION": [ + "Basic " + ], + "Accept-Encoding": [ + "identity" + ], + "Connection": [ + "close" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://www.reddit.com/api/v1/access_token" + }, + "response": { + "body": { + "string": "{\"access_token\": \"\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"refresh_token\": \"\", \"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": [ + "427" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:26:34 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "edgebucket=8D5kt3GpzhmOdRMv4j; Domain=reddit.com; Max-Age=63071999; Path=/; secure" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "max-age=0, must-revalidate" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "297" + ], + "x-ratelimit-reset": [ + "207" + ], + "x-ratelimit-used": [ + "3" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.reddit.com/api/v1/access_token" + } + }, + { + "request": { + "body": [ + [ + "api_type", + "json" + ], + [ + "collection_id", + "3aa31024-711b-46b2-9514-3fd50619f6e8" + ], + [ + "display_layout", + "GALLERY" + ] + ], + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=8D5kt3GpzhmOdRMv4j" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + }, + "response": { + "body": { + "string": "{\"json\": {\"errors\": []}}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "24" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:26:34 GMT" + ], + "Server": [ + "snooserv" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate" + ], + "expires": [ + "-1" + ], + "set-cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2thN1RPNGxxQ1dhdUs0dHppWkJLbUxKbGRBQVNTd21VY3pCeC1iWmJNMjdNa0pJRlByWnpNb3Jjel93NWFEZnVzaFNZMFRnWlozSzFYYlY1Ni1rX0VYOGE1cURrcWhETWZEZE1UblBoUFoyR2ZzOURYVGZNLTBFSFFQQkxCZV95TVU; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Sun, 24-Dec-2023 22:26:34 GMT; secure", + "redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Mon, 23-Dec-2024 22:26:34 GMT; secure", + "session_tracker=kfgpkelhcrcnjmijcp.0.1640384794207.Z0FBQUFBQmh4a2thOXVvTHctR1pvalJFbWx0Sjl0dWQ4WUZTaEpEN0IwbXpORU51ajVqaldjbkJQVVItV2pVUWlVSWxEUDhkM2lwN0VEd0ttS2JPZERPcGV1YXpicWFESzVGcjc2S3k5ajI5dWF5QlBQOWhfTVhmMVpHSFFuRHh6TV9zYXdsS3o5Vy0; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:26:34 GMT; secure" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "238.0" + ], + "x-ratelimit-reset": [ + "206" + ], + "x-ratelimit-used": [ + "362" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + } + }, + { + "request": { + "body": null, + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=8D5kt3GpzhmOdRMv4j; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2thN1RPNGxxQ1dhdUs0dHppWkJLbUxKbGRBQVNTd21VY3pCeC1iWmJNMjdNa0pJRlByWnpNb3Jjel93NWFEZnVzaFNZMFRnWlozSzFYYlY1Ni1rX0VYOGE1cURrcWhETWZEZE1UblBoUFoyR2ZzOURYVGZNLTBFSFFQQkxCZV95TVU; redesign_optout=true; session_tracker=kfgpkelhcrcnjmijcp.0.1640384794207.Z0FBQUFBQmh4a2thOXVvTHctR1pvalJFbWx0Sjl0dWQ4WUZTaEpEN0IwbXpORU51ajVqaldjbkJQVVItV2pVUWlVSWxEUDhkM2lwN0VEd0ttS2JPZERPcGV1YXpicWFESzVGcjc2S3k5ajI5dWF5QlBQOWhfTVhmMVpHSFFuRHh6TV9zYXdsS3o5Vy0" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "GET", + "uri": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + }, + "response": { + "body": { + "string": "{\"sorted_links\": {\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": 3, \"modhash\": null, \"geo_filter\": \"\", \"children\": [{\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e2k\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018413.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e2k\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e2k/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/k62e2k/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018413.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": 1554954080, \"subreddit\": \"\", \"selftext\": \"Hello peoples!\\n\\nLast week, we [asked your opinion](https://redd.it/aufll1) on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\n \\n\\nThe new rule:\\n\\n\\u003E #No Memes \\n\\u003E \\n\\u003E No memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub r/fakehistorymemes. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\n\\n##This means that all memes* now go in r/fakehistorymemes\\n^don\\u2019t ^forget ^to ^like, ^comment ^and ^subscribe!\\n\\n\\nOne thing we need to stress:\\n#There will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a ~~nasty~~ reminder to post memes in r/fakehistorymemes.\\n\\nSeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\n\\n1. It would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone's posts and all our slaves are busy doing other things.\\n2. This doesn't work for people who just view the sub through their feed as you can't sort by flair there.\\n\\nThis is where as having 2 subs allows for this functionality. \\n\\nJust to reiterate, memes now go in r/fakehistorymemes, while the OG style of post (such as those found in the top posts of all time) belong here.\\n\\n^(*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes ^please ^no and other memey things should instead be posted on r/fakehisotrymemes. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. r/fakehisotrymemes is still run by the same mod team (i.e., us)^) ^(so the rules will be similar (close to non-existent)^) ^(and we will be running similar competitions.)\\n\\nDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\n\\nThanks for being the best part of r/fakehistoryporn!\\n\\nSincerely,\\n\\n~~Meme Police~~ The r/fakehistoryporn mod team\\n\\n___\\n\\nIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the [Official Discord](https://discord.gg/vWa5BRt), [Modmail](https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn) or in the comments of this post. \\n\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [{\"e\": \"text\", \"t\": \"test\"}], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": \"\", \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_axdfp2\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_o77bz\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": \"test\", \"can_mod_post\": true, \"score\": 1, \"approved_by\": \"\", \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"post_hint\": \"self\", \"content_categories\": null, \"is_self\": true, \"mod_note\": null, \"created\": 1551739042.0, \"link_flair_type\": \"richtext\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md\\\"\\u003E\\u003Cp\\u003EHello peoples!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ELast week, we \\u003Ca href=\\\"https://redd.it/aufll1\\\"\\u003Easked your opinion\\u003C/a\\u003E on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThe new rule:\\u003C/p\\u003E\\n\\n\\u003Cblockquote\\u003E\\n\\u003Ch1\\u003ENo Memes\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ENo memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\u003C/p\\u003E\\n\\u003C/blockquote\\u003E\\n\\n\\u003Ch2\\u003EThis means that all memes* now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003Edon\\u2019t\\u003C/sup\\u003E \\u003Csup\\u003Eforget\\u003C/sup\\u003E \\u003Csup\\u003Eto\\u003C/sup\\u003E \\u003Csup\\u003Elike,\\u003C/sup\\u003E \\u003Csup\\u003Ecomment\\u003C/sup\\u003E \\u003Csup\\u003Eand\\u003C/sup\\u003E \\u003Csup\\u003Esubscribe!\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EOne thing we need to stress:\\u003C/p\\u003E\\n\\n\\u003Ch1\\u003EThere will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a \\u003Cdel\\u003Enasty\\u003C/del\\u003E reminder to post memes in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E.\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ESeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\u003C/p\\u003E\\n\\n\\u003Col\\u003E\\n\\u003Cli\\u003EIt would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone\\u0026#39;s posts and all our slaves are busy doing other things.\\u003C/li\\u003E\\n\\u003Cli\\u003EThis doesn\\u0026#39;t work for people who just view the sub through their feed as you can\\u0026#39;t sort by flair there.\\u003C/li\\u003E\\n\\u003C/ol\\u003E\\n\\n\\u003Cp\\u003EThis is where as having 2 subs allows for this functionality. \\u003C/p\\u003E\\n\\n\\u003Cp\\u003EJust to reiterate, memes now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E, while the OG style of post (such as those found in the top posts of all time) belong here.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003E*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes \\u003Csup\\u003Eplease\\u003C/sup\\u003E \\u003Csup\\u003Eno\\u003C/sup\\u003E and other memey things should instead be posted on \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E is still run by the same mod team (i.e., us\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eso the rules will be similar (close to non-existent\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eand we will be running similar competitions.\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThanks for being the best part of \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ESincerely,\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Cdel\\u003EMeme Police\\u003C/del\\u003E The \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E mod team\\u003C/p\\u003E\\n\\n\\u003Chr/\\u003E\\n\\n\\u003Cp\\u003EIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the \\u003Ca href=\\\"https://discord.gg/vWa5BRt\\\"\\u003EOfficial Discord\\u003C/a\\u003E, \\u003Ca href=\\\"https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn\\\"\\u003EModmail\\u003C/a\\u003E or in the comments of this post. \\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"likes\": true, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": false, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"preview\": {\"images\": [{\"source\": {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?auto=webp\\u0026s=ceaef94ac6b8f26b071a98866b446a4a0a567032\", \"width\": 1200, \"height\": 628}, \"resolutions\": [{\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=108\\u0026crop=smart\\u0026auto=webp\\u0026s=1dcc9ca3a866f7b4aacfadda858fab6a5652ecbf\", \"width\": 108, \"height\": 56}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=216\\u0026crop=smart\\u0026auto=webp\\u0026s=b601492d6131461f3a1d195c82753317c0082d05\", \"width\": 216, \"height\": 113}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=320\\u0026crop=smart\\u0026auto=webp\\u0026s=9df19ec5db5047dae1fadeec15b6836f38a6a917\", \"width\": 320, \"height\": 167}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=640\\u0026crop=smart\\u0026auto=webp\\u0026s=bdc6a700886d20d02dd8e29d1f5b3a721deabb4a\", \"width\": 640, \"height\": 334}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=960\\u0026crop=smart\\u0026auto=webp\\u0026s=8cab368c12c276549af3f8245418a03d27645013\", \"width\": 960, \"height\": 502}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=1080\\u0026crop=smart\\u0026auto=webp\\u0026s=07a44ca128379479601d3de5764bee14dc1b2f74\", \"width\": 1080, \"height\": 565}], \"variants\": {}, \"id\": \"ltRJIJZJxzAbU2ofId4f5xpfVwmSPFOuFlvarmLqasI\"}], \"enabled\": false}, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"link_flair_template_id\": \"94f13282-e2e8-11e8-8291-0eae4e167256\", \"can_gild\": false, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"rte_mode\": \"markdown\", \"visited\": false, \"removed_by\": null, \"subreddit_type\": \"restricted\", \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"axdfp2\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"\", \"discussion_type\": null, \"num_comments\": 1, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": true, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/axdfp2/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/axdfp2/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1551739042.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e3m\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018415.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 1, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e3m\", \"is_robot_indexable\": true, \"report_reasons\": [\"This attribute is deprecated. Please use mod_reports and user_reports instead.\"], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e3m/test/\", \"whitelist_status\": null, \"stickied\": true, \"url\": \"https://www.reddit.com/r//comments/k62e3m/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018415.0, \"num_crossposts\": 0, \"mod_reports\": [[\"No spa5\", \"\"]], \"is_video\": false}}], \"before\": null}}, \"subreddit_id\": \"t5_7ss0q\", \"description\": \"hi\", \"primary_link_id\": \"t3_k62e2k\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"display_layout\": \"GALLERY\", \"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "20056" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:26:34 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2thN1RPNGxxQ1dhdUs0dHppWkJLbUxKbGRBQVNTd21VY3pCeC1iWmJNMjdNa0pJRlByWnpNb3Jjel93NWFEZnVzaFNZMFRnWlozSzFYYlY1Ni1rX0VYOGE1cURrcWhETWZEZE1UblBoUFoyR2ZzOURYVGZNLTBFSFFQQkxCZV95TVU; Max-Age=63072000; Path=/; Domain=.reddit.com; SameSite=None; Secure", + "session_tracker=kfgpkelhcrcnjmijcp.0.1640384794354.Z0FBQUFBQmh4a2thWDBHMjlJRklLQ2pmem8tdHp3dU5tSFNsWjhvWi14SnFQOU9RNGdtWEpidXVWZ0VnQVdGeXR0cmdOY3dUV2QzSXgtTnNpaWM0MlhXOTVDV3VJcjVyZkxGckNTZnMtX2poM0E4X2ljMEY1X1hPclFwaFR0amE1azNqdXFydDBaWV8; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:26:34 GMT; secure; SameSite=None; Secure", + "csv=2; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Vary": [ + "accept-encoding" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "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": [ + "237.0" + ], + "x-ratelimit-reset": [ + "206" + ], + "x-ratelimit-used": [ + "363" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + } + } + ], + "recorded_at": "2021-12-24T16:26:34", + "version": 1 +} diff --git a/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__invalid_layout.json b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__invalid_layout.json new file mode 100644 index 00000000..4ab7d5cf --- /dev/null +++ b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__invalid_layout.json @@ -0,0 +1,308 @@ +{ + "interactions": [ + { + "request": { + "body": [ + [ + "grant_type", + "refresh_token" + ], + [ + "refresh_token", + "" + ] + ], + "headers": { + "AUTHORIZATION": [ + "Basic " + ], + "Accept-Encoding": [ + "identity" + ], + "Connection": [ + "close" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://www.reddit.com/api/v1/access_token" + }, + "response": { + "body": { + "string": "{\"access_token\": \"\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"refresh_token\": \"\", \"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": [ + "427" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:17 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "edgebucket=I1uRzVsUjl54F9qOkr; Domain=reddit.com; Max-Age=63071999; Path=/; secure" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "max-age=0, must-revalidate" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "293" + ], + "x-ratelimit-reset": [ + "163" + ], + "x-ratelimit-used": [ + "7" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.reddit.com/api/v1/access_token" + } + }, + { + "request": { + "body": [ + [ + "api_type", + "json" + ], + [ + "collection_id", + "3aa31024-711b-46b2-9514-3fd50619f6e8" + ], + [ + "display_layout", + "colossal atom cake" + ] + ], + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=I1uRzVsUjl54F9qOkr" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + }, + "response": { + "body": { + "string": "{\"json\": {\"errors\": [[\"INVALID_OPTION\", \"that option is not valid\", \"display_layout\"]]}}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "88" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:17 GMT" + ], + "Server": [ + "snooserv" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate" + ], + "expires": [ + "-1" + ], + "set-cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2xGRjYtMUhKQlFzeWFsVkZmZWtDWkZ5ZTRuMUF6a29LUkNKMFJLOVpSaW1yUlItNElUQ2FjcVgzYmJWckgxaGhkX2tuVVJOb0FHU0hmZEE0aXBhaFE2ZVJpWFZjRW1uSmVqd01VdWVFWVRtMmJELUx1TDlfYUNVZ3dJTWcxZkNvUFg; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Sun, 24-Dec-2023 22:27:17 GMT; secure", + "redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Mon, 23-Dec-2024 22:27:17 GMT; secure", + "session_tracker=miqqmrajbhqnpcnhcj.0.1640384837635.Z0FBQUFBQmh4a2xGQ0VnWmM3OG1zV1pNaUU1RVktbXhERkFfX2JITF9sazJ3Nk15cTNodWYxZzlwcGg4UEhtQjV5LWhvMGhpOHNYQnRLa2NhRndhUzZfVzBEeG9zcHVyUEx0SzFrcnhBMFlWaVZDNDc4UXdIMmJhT2VRS2h6c3lPbkM4MXFhaV8wLXU; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:27:17 GMT; secure" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "193.0" + ], + "x-ratelimit-reset": [ + "163" + ], + "x-ratelimit-used": [ + "407" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + } + }, + { + "request": { + "body": null, + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=I1uRzVsUjl54F9qOkr; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2xGRjYtMUhKQlFzeWFsVkZmZWtDWkZ5ZTRuMUF6a29LUkNKMFJLOVpSaW1yUlItNElUQ2FjcVgzYmJWckgxaGhkX2tuVVJOb0FHU0hmZEE0aXBhaFE2ZVJpWFZjRW1uSmVqd01VdWVFWVRtMmJELUx1TDlfYUNVZ3dJTWcxZkNvUFg; redesign_optout=true; session_tracker=miqqmrajbhqnpcnhcj.0.1640384837635.Z0FBQUFBQmh4a2xGQ0VnWmM3OG1zV1pNaUU1RVktbXhERkFfX2JITF9sazJ3Nk15cTNodWYxZzlwcGg4UEhtQjV5LWhvMGhpOHNYQnRLa2NhRndhUzZfVzBEeG9zcHVyUEx0SzFrcnhBMFlWaVZDNDc4UXdIMmJhT2VRS2h6c3lPbkM4MXFhaV8wLXU" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "GET", + "uri": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + }, + "response": { + "body": { + "string": "{\"sorted_links\": {\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": 3, \"modhash\": null, \"geo_filter\": \"\", \"children\": [{\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e2k\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018413.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e2k\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e2k/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/k62e2k/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018413.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": 1554954080, \"subreddit\": \"\", \"selftext\": \"Hello peoples!\\n\\nLast week, we [asked your opinion](https://redd.it/aufll1) on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\n \\n\\nThe new rule:\\n\\n\\u003E #No Memes \\n\\u003E \\n\\u003E No memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub r/fakehistorymemes. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\n\\n##This means that all memes* now go in r/fakehistorymemes\\n^don\\u2019t ^forget ^to ^like, ^comment ^and ^subscribe!\\n\\n\\nOne thing we need to stress:\\n#There will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a ~~nasty~~ reminder to post memes in r/fakehistorymemes.\\n\\nSeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\n\\n1. It would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone's posts and all our slaves are busy doing other things.\\n2. This doesn't work for people who just view the sub through their feed as you can't sort by flair there.\\n\\nThis is where as having 2 subs allows for this functionality. \\n\\nJust to reiterate, memes now go in r/fakehistorymemes, while the OG style of post (such as those found in the top posts of all time) belong here.\\n\\n^(*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes ^please ^no and other memey things should instead be posted on r/fakehisotrymemes. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. r/fakehisotrymemes is still run by the same mod team (i.e., us)^) ^(so the rules will be similar (close to non-existent)^) ^(and we will be running similar competitions.)\\n\\nDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\n\\nThanks for being the best part of r/fakehistoryporn!\\n\\nSincerely,\\n\\n~~Meme Police~~ The r/fakehistoryporn mod team\\n\\n___\\n\\nIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the [Official Discord](https://discord.gg/vWa5BRt), [Modmail](https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn) or in the comments of this post. \\n\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [{\"e\": \"text\", \"t\": \"test\"}], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": \"\", \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_axdfp2\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_o77bz\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": \"test\", \"can_mod_post\": true, \"score\": 1, \"approved_by\": \"\", \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"post_hint\": \"self\", \"content_categories\": null, \"is_self\": true, \"mod_note\": null, \"created\": 1551739042.0, \"link_flair_type\": \"richtext\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md\\\"\\u003E\\u003Cp\\u003EHello peoples!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ELast week, we \\u003Ca href=\\\"https://redd.it/aufll1\\\"\\u003Easked your opinion\\u003C/a\\u003E on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThe new rule:\\u003C/p\\u003E\\n\\n\\u003Cblockquote\\u003E\\n\\u003Ch1\\u003ENo Memes\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ENo memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\u003C/p\\u003E\\n\\u003C/blockquote\\u003E\\n\\n\\u003Ch2\\u003EThis means that all memes* now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003Edon\\u2019t\\u003C/sup\\u003E \\u003Csup\\u003Eforget\\u003C/sup\\u003E \\u003Csup\\u003Eto\\u003C/sup\\u003E \\u003Csup\\u003Elike,\\u003C/sup\\u003E \\u003Csup\\u003Ecomment\\u003C/sup\\u003E \\u003Csup\\u003Eand\\u003C/sup\\u003E \\u003Csup\\u003Esubscribe!\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EOne thing we need to stress:\\u003C/p\\u003E\\n\\n\\u003Ch1\\u003EThere will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a \\u003Cdel\\u003Enasty\\u003C/del\\u003E reminder to post memes in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E.\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ESeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\u003C/p\\u003E\\n\\n\\u003Col\\u003E\\n\\u003Cli\\u003EIt would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone\\u0026#39;s posts and all our slaves are busy doing other things.\\u003C/li\\u003E\\n\\u003Cli\\u003EThis doesn\\u0026#39;t work for people who just view the sub through their feed as you can\\u0026#39;t sort by flair there.\\u003C/li\\u003E\\n\\u003C/ol\\u003E\\n\\n\\u003Cp\\u003EThis is where as having 2 subs allows for this functionality. \\u003C/p\\u003E\\n\\n\\u003Cp\\u003EJust to reiterate, memes now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E, while the OG style of post (such as those found in the top posts of all time) belong here.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003E*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes \\u003Csup\\u003Eplease\\u003C/sup\\u003E \\u003Csup\\u003Eno\\u003C/sup\\u003E and other memey things should instead be posted on \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E is still run by the same mod team (i.e., us\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eso the rules will be similar (close to non-existent\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eand we will be running similar competitions.\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThanks for being the best part of \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ESincerely,\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Cdel\\u003EMeme Police\\u003C/del\\u003E The \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E mod team\\u003C/p\\u003E\\n\\n\\u003Chr/\\u003E\\n\\n\\u003Cp\\u003EIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the \\u003Ca href=\\\"https://discord.gg/vWa5BRt\\\"\\u003EOfficial Discord\\u003C/a\\u003E, \\u003Ca href=\\\"https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn\\\"\\u003EModmail\\u003C/a\\u003E or in the comments of this post. \\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"likes\": true, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": false, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"preview\": {\"images\": [{\"source\": {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?auto=webp\\u0026s=ceaef94ac6b8f26b071a98866b446a4a0a567032\", \"width\": 1200, \"height\": 628}, \"resolutions\": [{\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=108\\u0026crop=smart\\u0026auto=webp\\u0026s=1dcc9ca3a866f7b4aacfadda858fab6a5652ecbf\", \"width\": 108, \"height\": 56}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=216\\u0026crop=smart\\u0026auto=webp\\u0026s=b601492d6131461f3a1d195c82753317c0082d05\", \"width\": 216, \"height\": 113}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=320\\u0026crop=smart\\u0026auto=webp\\u0026s=9df19ec5db5047dae1fadeec15b6836f38a6a917\", \"width\": 320, \"height\": 167}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=640\\u0026crop=smart\\u0026auto=webp\\u0026s=bdc6a700886d20d02dd8e29d1f5b3a721deabb4a\", \"width\": 640, \"height\": 334}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=960\\u0026crop=smart\\u0026auto=webp\\u0026s=8cab368c12c276549af3f8245418a03d27645013\", \"width\": 960, \"height\": 502}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=1080\\u0026crop=smart\\u0026auto=webp\\u0026s=07a44ca128379479601d3de5764bee14dc1b2f74\", \"width\": 1080, \"height\": 565}], \"variants\": {}, \"id\": \"ltRJIJZJxzAbU2ofId4f5xpfVwmSPFOuFlvarmLqasI\"}], \"enabled\": false}, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"link_flair_template_id\": \"94f13282-e2e8-11e8-8291-0eae4e167256\", \"can_gild\": false, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"rte_mode\": \"markdown\", \"visited\": false, \"removed_by\": null, \"subreddit_type\": \"restricted\", \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"axdfp2\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"\", \"discussion_type\": null, \"num_comments\": 1, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": true, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/axdfp2/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/axdfp2/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1551739042.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e3m\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018415.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 1, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e3m\", \"is_robot_indexable\": true, \"report_reasons\": [\"This attribute is deprecated. Please use mod_reports and user_reports instead.\"], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e3m/test/\", \"whitelist_status\": null, \"stickied\": true, \"url\": \"https://www.reddit.com/r//comments/k62e3m/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018415.0, \"num_crossposts\": 0, \"mod_reports\": [[\"No spa5\", \"\"]], \"is_video\": false}}], \"before\": null}}, \"subreddit_id\": \"t5_7ss0q\", \"description\": \"hi\", \"primary_link_id\": \"t3_k62e2k\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"display_layout\": null, \"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "20051" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:17 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2xGRjYtMUhKQlFzeWFsVkZmZWtDWkZ5ZTRuMUF6a29LUkNKMFJLOVpSaW1yUlItNElUQ2FjcVgzYmJWckgxaGhkX2tuVVJOb0FHU0hmZEE0aXBhaFE2ZVJpWFZjRW1uSmVqd01VdWVFWVRtMmJELUx1TDlfYUNVZ3dJTWcxZkNvUFg; Max-Age=63072000; Path=/; Domain=.reddit.com; SameSite=None; Secure", + "session_tracker=miqqmrajbhqnpcnhcj.0.1640384837769.Z0FBQUFBQmh4a2xGSzNhT21GR2MxTzF1N1NIdlJnME16UG1VMWIyRUVlWTEyaUt4ZW16RVFfN0MtV0lldzRhYjRRMHJqTE5NekVqMUdjY1hEa24xSzlqQ090N016M3BwRzRCaG12Zk8yWW1FcjhkYzdLdjV4c1RnbUxrOVhScFhlMGIyRXlLUjVTTUU; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:27:17 GMT; secure; SameSite=None; Secure", + "csv=2; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Vary": [ + "accept-encoding" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "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": [ + "192.0" + ], + "x-ratelimit-reset": [ + "163" + ], + "x-ratelimit-used": [ + "408" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + } + } + ], + "recorded_at": "2021-12-24T16:27:17", + "version": 1 +} diff --git a/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__lowercase.json b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__lowercase.json new file mode 100644 index 00000000..173c4836 --- /dev/null +++ b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__lowercase.json @@ -0,0 +1,308 @@ +{ + "interactions": [ + { + "request": { + "body": [ + [ + "grant_type", + "refresh_token" + ], + [ + "refresh_token", + "" + ] + ], + "headers": { + "AUTHORIZATION": [ + "Basic " + ], + "Accept-Encoding": [ + "identity" + ], + "Connection": [ + "close" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://www.reddit.com/api/v1/access_token" + }, + "response": { + "body": { + "string": "{\"access_token\": \"\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"refresh_token\": \"\", \"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": [ + "427" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:10 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "edgebucket=515EPNybWOlRLQ6UIe; Domain=reddit.com; Max-Age=63071999; Path=/; secure" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "max-age=0, must-revalidate" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "294" + ], + "x-ratelimit-reset": [ + "170" + ], + "x-ratelimit-used": [ + "6" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.reddit.com/api/v1/access_token" + } + }, + { + "request": { + "body": [ + [ + "api_type", + "json" + ], + [ + "collection_id", + "3aa31024-711b-46b2-9514-3fd50619f6e8" + ], + [ + "display_layout", + "gallery" + ] + ], + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=515EPNybWOlRLQ6UIe" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + }, + "response": { + "body": { + "string": "{\"json\": {\"errors\": [[\"INVALID_OPTION\", \"that option is not valid\", \"display_layout\"]]}}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "88" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:10 GMT" + ], + "Server": [ + "snooserv" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate" + ], + "expires": [ + "-1" + ], + "set-cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2stVmpyNjJPcVdUVXZwTFVTRnZuSFhKdGtDMndoQy0xMGpvUnpkRkZqT3pEMDdfcEwxVmd0Sm95N011SFQwRW12RXpLV250RE5XRmQtMFpyc3dwcmRlaTRrOUhMaTk4NHFLVGYzaVVfNEtsZW1vRU1zM0taQXZYUXc2dWlZWlp3S2s; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Sun, 24-Dec-2023 22:27:10 GMT; secure", + "redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Mon, 23-Dec-2024 22:27:10 GMT; secure", + "session_tracker=paaeonhflgkbhmbgqf.0.1640384830598.Z0FBQUFBQmh4a2stb1pHRmR3dXdXMGdDaGdLcGZmbDVkLTZHUDdiODVFeFB3SDBTcFE1RThqbWJHb2s4V2poN3RFR0FJTThhNDRpdU9YcV92Nk8zaFEyS0d2SmFpRC1HMmoyZDMzeThNR1o1Y19Bb0pDOVVlaHdWMFU2cEtSNUZrMTRnOU44RFBic3o; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:27:10 GMT; secure" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "201.0" + ], + "x-ratelimit-reset": [ + "170" + ], + "x-ratelimit-used": [ + "399" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + } + }, + { + "request": { + "body": null, + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=515EPNybWOlRLQ6UIe; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2stVmpyNjJPcVdUVXZwTFVTRnZuSFhKdGtDMndoQy0xMGpvUnpkRkZqT3pEMDdfcEwxVmd0Sm95N011SFQwRW12RXpLV250RE5XRmQtMFpyc3dwcmRlaTRrOUhMaTk4NHFLVGYzaVVfNEtsZW1vRU1zM0taQXZYUXc2dWlZWlp3S2s; redesign_optout=true; session_tracker=paaeonhflgkbhmbgqf.0.1640384830598.Z0FBQUFBQmh4a2stb1pHRmR3dXdXMGdDaGdLcGZmbDVkLTZHUDdiODVFeFB3SDBTcFE1RThqbWJHb2s4V2poN3RFR0FJTThhNDRpdU9YcV92Nk8zaFEyS0d2SmFpRC1HMmoyZDMzeThNR1o1Y19Bb0pDOVVlaHdWMFU2cEtSNUZrMTRnOU44RFBic3o" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "GET", + "uri": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + }, + "response": { + "body": { + "string": "{\"sorted_links\": {\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": 3, \"modhash\": null, \"geo_filter\": \"\", \"children\": [{\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e2k\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018413.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e2k\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e2k/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/k62e2k/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018413.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": 1554954080, \"subreddit\": \"\", \"selftext\": \"Hello peoples!\\n\\nLast week, we [asked your opinion](https://redd.it/aufll1) on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\n \\n\\nThe new rule:\\n\\n\\u003E #No Memes \\n\\u003E \\n\\u003E No memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub r/fakehistorymemes. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\n\\n##This means that all memes* now go in r/fakehistorymemes\\n^don\\u2019t ^forget ^to ^like, ^comment ^and ^subscribe!\\n\\n\\nOne thing we need to stress:\\n#There will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a ~~nasty~~ reminder to post memes in r/fakehistorymemes.\\n\\nSeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\n\\n1. It would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone's posts and all our slaves are busy doing other things.\\n2. This doesn't work for people who just view the sub through their feed as you can't sort by flair there.\\n\\nThis is where as having 2 subs allows for this functionality. \\n\\nJust to reiterate, memes now go in r/fakehistorymemes, while the OG style of post (such as those found in the top posts of all time) belong here.\\n\\n^(*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes ^please ^no and other memey things should instead be posted on r/fakehisotrymemes. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. r/fakehisotrymemes is still run by the same mod team (i.e., us)^) ^(so the rules will be similar (close to non-existent)^) ^(and we will be running similar competitions.)\\n\\nDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\n\\nThanks for being the best part of r/fakehistoryporn!\\n\\nSincerely,\\n\\n~~Meme Police~~ The r/fakehistoryporn mod team\\n\\n___\\n\\nIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the [Official Discord](https://discord.gg/vWa5BRt), [Modmail](https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn) or in the comments of this post. \\n\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [{\"e\": \"text\", \"t\": \"test\"}], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": \"\", \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_axdfp2\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_o77bz\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": \"test\", \"can_mod_post\": true, \"score\": 1, \"approved_by\": \"\", \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"post_hint\": \"self\", \"content_categories\": null, \"is_self\": true, \"mod_note\": null, \"created\": 1551739042.0, \"link_flair_type\": \"richtext\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md\\\"\\u003E\\u003Cp\\u003EHello peoples!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ELast week, we \\u003Ca href=\\\"https://redd.it/aufll1\\\"\\u003Easked your opinion\\u003C/a\\u003E on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThe new rule:\\u003C/p\\u003E\\n\\n\\u003Cblockquote\\u003E\\n\\u003Ch1\\u003ENo Memes\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ENo memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\u003C/p\\u003E\\n\\u003C/blockquote\\u003E\\n\\n\\u003Ch2\\u003EThis means that all memes* now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003Edon\\u2019t\\u003C/sup\\u003E \\u003Csup\\u003Eforget\\u003C/sup\\u003E \\u003Csup\\u003Eto\\u003C/sup\\u003E \\u003Csup\\u003Elike,\\u003C/sup\\u003E \\u003Csup\\u003Ecomment\\u003C/sup\\u003E \\u003Csup\\u003Eand\\u003C/sup\\u003E \\u003Csup\\u003Esubscribe!\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EOne thing we need to stress:\\u003C/p\\u003E\\n\\n\\u003Ch1\\u003EThere will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a \\u003Cdel\\u003Enasty\\u003C/del\\u003E reminder to post memes in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E.\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ESeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\u003C/p\\u003E\\n\\n\\u003Col\\u003E\\n\\u003Cli\\u003EIt would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone\\u0026#39;s posts and all our slaves are busy doing other things.\\u003C/li\\u003E\\n\\u003Cli\\u003EThis doesn\\u0026#39;t work for people who just view the sub through their feed as you can\\u0026#39;t sort by flair there.\\u003C/li\\u003E\\n\\u003C/ol\\u003E\\n\\n\\u003Cp\\u003EThis is where as having 2 subs allows for this functionality. \\u003C/p\\u003E\\n\\n\\u003Cp\\u003EJust to reiterate, memes now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E, while the OG style of post (such as those found in the top posts of all time) belong here.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003E*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes \\u003Csup\\u003Eplease\\u003C/sup\\u003E \\u003Csup\\u003Eno\\u003C/sup\\u003E and other memey things should instead be posted on \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E is still run by the same mod team (i.e., us\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eso the rules will be similar (close to non-existent\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eand we will be running similar competitions.\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThanks for being the best part of \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ESincerely,\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Cdel\\u003EMeme Police\\u003C/del\\u003E The \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E mod team\\u003C/p\\u003E\\n\\n\\u003Chr/\\u003E\\n\\n\\u003Cp\\u003EIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the \\u003Ca href=\\\"https://discord.gg/vWa5BRt\\\"\\u003EOfficial Discord\\u003C/a\\u003E, \\u003Ca href=\\\"https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn\\\"\\u003EModmail\\u003C/a\\u003E or in the comments of this post. \\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"likes\": true, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": false, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"preview\": {\"images\": [{\"source\": {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?auto=webp\\u0026s=ceaef94ac6b8f26b071a98866b446a4a0a567032\", \"width\": 1200, \"height\": 628}, \"resolutions\": [{\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=108\\u0026crop=smart\\u0026auto=webp\\u0026s=1dcc9ca3a866f7b4aacfadda858fab6a5652ecbf\", \"width\": 108, \"height\": 56}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=216\\u0026crop=smart\\u0026auto=webp\\u0026s=b601492d6131461f3a1d195c82753317c0082d05\", \"width\": 216, \"height\": 113}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=320\\u0026crop=smart\\u0026auto=webp\\u0026s=9df19ec5db5047dae1fadeec15b6836f38a6a917\", \"width\": 320, \"height\": 167}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=640\\u0026crop=smart\\u0026auto=webp\\u0026s=bdc6a700886d20d02dd8e29d1f5b3a721deabb4a\", \"width\": 640, \"height\": 334}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=960\\u0026crop=smart\\u0026auto=webp\\u0026s=8cab368c12c276549af3f8245418a03d27645013\", \"width\": 960, \"height\": 502}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=1080\\u0026crop=smart\\u0026auto=webp\\u0026s=07a44ca128379479601d3de5764bee14dc1b2f74\", \"width\": 1080, \"height\": 565}], \"variants\": {}, \"id\": \"ltRJIJZJxzAbU2ofId4f5xpfVwmSPFOuFlvarmLqasI\"}], \"enabled\": false}, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"link_flair_template_id\": \"94f13282-e2e8-11e8-8291-0eae4e167256\", \"can_gild\": false, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"rte_mode\": \"markdown\", \"visited\": false, \"removed_by\": null, \"subreddit_type\": \"restricted\", \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"axdfp2\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"\", \"discussion_type\": null, \"num_comments\": 1, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": true, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/axdfp2/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/axdfp2/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1551739042.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e3m\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018415.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 1, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e3m\", \"is_robot_indexable\": true, \"report_reasons\": [\"This attribute is deprecated. Please use mod_reports and user_reports instead.\"], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e3m/test/\", \"whitelist_status\": null, \"stickied\": true, \"url\": \"https://www.reddit.com/r//comments/k62e3m/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018415.0, \"num_crossposts\": 0, \"mod_reports\": [[\"No spa5\", \"\"]], \"is_video\": false}}], \"before\": null}}, \"subreddit_id\": \"t5_7ss0q\", \"description\": \"hi\", \"primary_link_id\": \"t3_k62e2k\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"display_layout\": null, \"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "20051" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:10 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2stVmpyNjJPcVdUVXZwTFVTRnZuSFhKdGtDMndoQy0xMGpvUnpkRkZqT3pEMDdfcEwxVmd0Sm95N011SFQwRW12RXpLV250RE5XRmQtMFpyc3dwcmRlaTRrOUhMaTk4NHFLVGYzaVVfNEtsZW1vRU1zM0taQXZYUXc2dWlZWlp3S2s; Max-Age=63072000; Path=/; Domain=.reddit.com; SameSite=None; Secure", + "session_tracker=paaeonhflgkbhmbgqf.0.1640384830709.Z0FBQUFBQmh4a2stOU9JeGRiTTh3YXdRRlVqZjhZLS1heE5XVDFxRzEwTGR0RDZmOVZKQUhiSFM3aVpKOVBPZGxCenMyZWZyTTFBR1pQb3pjdTYyUjMtQ3BqcDFwVW0wZ045NEdCV2MtLVhJdExLRndnNXJKUnNlZ194SlZWMHNMbkg2LTg1NkkyUUw; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:27:10 GMT; secure; SameSite=None; Secure", + "csv=2; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Vary": [ + "accept-encoding" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "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": [ + "199.0" + ], + "x-ratelimit-reset": [ + "170" + ], + "x-ratelimit-used": [ + "401" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + } + } + ], + "recorded_at": "2021-12-24T16:27:10", + "version": 1 +} diff --git a/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__none.json b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__none.json new file mode 100644 index 00000000..12e2acfb --- /dev/null +++ b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__none.json @@ -0,0 +1,304 @@ +{ + "interactions": [ + { + "request": { + "body": [ + [ + "grant_type", + "refresh_token" + ], + [ + "refresh_token", + "" + ] + ], + "headers": { + "AUTHORIZATION": [ + "Basic " + ], + "Accept-Encoding": [ + "identity" + ], + "Connection": [ + "close" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://www.reddit.com/api/v1/access_token" + }, + "response": { + "body": { + "string": "{\"access_token\": \"\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"refresh_token\": \"\", \"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": [ + "427" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:06 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "edgebucket=IvIm4bDXnMbgQZWWcn; Domain=reddit.com; Max-Age=63071999; Path=/; secure" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "max-age=0, must-revalidate" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "295" + ], + "x-ratelimit-reset": [ + "174" + ], + "x-ratelimit-used": [ + "5" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.reddit.com/api/v1/access_token" + } + }, + { + "request": { + "body": [ + [ + "api_type", + "json" + ], + [ + "collection_id", + "3aa31024-711b-46b2-9514-3fd50619f6e8" + ] + ], + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=IvIm4bDXnMbgQZWWcn" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + }, + "response": { + "body": { + "string": "{\"json\": {\"errors\": []}}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "24" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:06 GMT" + ], + "Server": [ + "snooserv" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate" + ], + "expires": [ + "-1" + ], + "set-cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2s2TEZiXzVyejY3YlBPT19qUmFMY0lUSV9uSUxnYWgxTVZDSEtEb1BQZGJtcjBmMWZqRDlDVXpDVlo1SnpWc0NvdkdoTVE2SjVhdFZaMDVUNHRTTnNTVmRsUGNxM1lzTjJ3Qk1yQUFSTXJqRG9JU2pPOFo3aFItWWZsVXZ3Sjkzck0; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Sun, 24-Dec-2023 22:27:06 GMT; secure", + "redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Mon, 23-Dec-2024 22:27:06 GMT; secure", + "session_tracker=kkcjggrmhiobaofong.0.1640384826426.Z0FBQUFBQmh4a2s2M0hocHlydjFBUDZCZFA3ZktWM0NzWjZFa3E3M1VzSHBteFdUa2tWbmdDRFZRTUlKd20tQy1qV0hkT2FRNmdXWVJPTk5kdmU2WTNjX3p6WjU3MnlOdmY1d25IVkRPSVJsZTVrWDFLUndIbEFOV1ptbFExeF85QVV5NFJjSzZjN3o; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:27:06 GMT; secure" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "205.0" + ], + "x-ratelimit-reset": [ + "174" + ], + "x-ratelimit-used": [ + "395" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + } + }, + { + "request": { + "body": null, + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=IvIm4bDXnMbgQZWWcn; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2s2TEZiXzVyejY3YlBPT19qUmFMY0lUSV9uSUxnYWgxTVZDSEtEb1BQZGJtcjBmMWZqRDlDVXpDVlo1SnpWc0NvdkdoTVE2SjVhdFZaMDVUNHRTTnNTVmRsUGNxM1lzTjJ3Qk1yQUFSTXJqRG9JU2pPOFo3aFItWWZsVXZ3Sjkzck0; redesign_optout=true; session_tracker=kkcjggrmhiobaofong.0.1640384826426.Z0FBQUFBQmh4a2s2M0hocHlydjFBUDZCZFA3ZktWM0NzWjZFa3E3M1VzSHBteFdUa2tWbmdDRFZRTUlKd20tQy1qV0hkT2FRNmdXWVJPTk5kdmU2WTNjX3p6WjU3MnlOdmY1d25IVkRPSVJsZTVrWDFLUndIbEFOV1ptbFExeF85QVV5NFJjSzZjN3o" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "GET", + "uri": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + }, + "response": { + "body": { + "string": "{\"sorted_links\": {\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": 3, \"modhash\": null, \"geo_filter\": \"\", \"children\": [{\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e2k\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018413.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e2k\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e2k/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/k62e2k/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018413.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": 1554954080, \"subreddit\": \"\", \"selftext\": \"Hello peoples!\\n\\nLast week, we [asked your opinion](https://redd.it/aufll1) on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\n \\n\\nThe new rule:\\n\\n\\u003E #No Memes \\n\\u003E \\n\\u003E No memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub r/fakehistorymemes. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\n\\n##This means that all memes* now go in r/fakehistorymemes\\n^don\\u2019t ^forget ^to ^like, ^comment ^and ^subscribe!\\n\\n\\nOne thing we need to stress:\\n#There will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a ~~nasty~~ reminder to post memes in r/fakehistorymemes.\\n\\nSeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\n\\n1. It would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone's posts and all our slaves are busy doing other things.\\n2. This doesn't work for people who just view the sub through their feed as you can't sort by flair there.\\n\\nThis is where as having 2 subs allows for this functionality. \\n\\nJust to reiterate, memes now go in r/fakehistorymemes, while the OG style of post (such as those found in the top posts of all time) belong here.\\n\\n^(*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes ^please ^no and other memey things should instead be posted on r/fakehisotrymemes. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. r/fakehisotrymemes is still run by the same mod team (i.e., us)^) ^(so the rules will be similar (close to non-existent)^) ^(and we will be running similar competitions.)\\n\\nDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\n\\nThanks for being the best part of r/fakehistoryporn!\\n\\nSincerely,\\n\\n~~Meme Police~~ The r/fakehistoryporn mod team\\n\\n___\\n\\nIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the [Official Discord](https://discord.gg/vWa5BRt), [Modmail](https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn) or in the comments of this post. \\n\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [{\"e\": \"text\", \"t\": \"test\"}], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": \"\", \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_axdfp2\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_o77bz\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": \"test\", \"can_mod_post\": true, \"score\": 1, \"approved_by\": \"\", \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"post_hint\": \"self\", \"content_categories\": null, \"is_self\": true, \"mod_note\": null, \"created\": 1551739042.0, \"link_flair_type\": \"richtext\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md\\\"\\u003E\\u003Cp\\u003EHello peoples!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ELast week, we \\u003Ca href=\\\"https://redd.it/aufll1\\\"\\u003Easked your opinion\\u003C/a\\u003E on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThe new rule:\\u003C/p\\u003E\\n\\n\\u003Cblockquote\\u003E\\n\\u003Ch1\\u003ENo Memes\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ENo memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\u003C/p\\u003E\\n\\u003C/blockquote\\u003E\\n\\n\\u003Ch2\\u003EThis means that all memes* now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003Edon\\u2019t\\u003C/sup\\u003E \\u003Csup\\u003Eforget\\u003C/sup\\u003E \\u003Csup\\u003Eto\\u003C/sup\\u003E \\u003Csup\\u003Elike,\\u003C/sup\\u003E \\u003Csup\\u003Ecomment\\u003C/sup\\u003E \\u003Csup\\u003Eand\\u003C/sup\\u003E \\u003Csup\\u003Esubscribe!\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EOne thing we need to stress:\\u003C/p\\u003E\\n\\n\\u003Ch1\\u003EThere will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a \\u003Cdel\\u003Enasty\\u003C/del\\u003E reminder to post memes in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E.\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ESeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\u003C/p\\u003E\\n\\n\\u003Col\\u003E\\n\\u003Cli\\u003EIt would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone\\u0026#39;s posts and all our slaves are busy doing other things.\\u003C/li\\u003E\\n\\u003Cli\\u003EThis doesn\\u0026#39;t work for people who just view the sub through their feed as you can\\u0026#39;t sort by flair there.\\u003C/li\\u003E\\n\\u003C/ol\\u003E\\n\\n\\u003Cp\\u003EThis is where as having 2 subs allows for this functionality. \\u003C/p\\u003E\\n\\n\\u003Cp\\u003EJust to reiterate, memes now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E, while the OG style of post (such as those found in the top posts of all time) belong here.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003E*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes \\u003Csup\\u003Eplease\\u003C/sup\\u003E \\u003Csup\\u003Eno\\u003C/sup\\u003E and other memey things should instead be posted on \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E is still run by the same mod team (i.e., us\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eso the rules will be similar (close to non-existent\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eand we will be running similar competitions.\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThanks for being the best part of \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ESincerely,\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Cdel\\u003EMeme Police\\u003C/del\\u003E The \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E mod team\\u003C/p\\u003E\\n\\n\\u003Chr/\\u003E\\n\\n\\u003Cp\\u003EIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the \\u003Ca href=\\\"https://discord.gg/vWa5BRt\\\"\\u003EOfficial Discord\\u003C/a\\u003E, \\u003Ca href=\\\"https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn\\\"\\u003EModmail\\u003C/a\\u003E or in the comments of this post. \\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"likes\": true, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": false, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"preview\": {\"images\": [{\"source\": {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?auto=webp\\u0026s=ceaef94ac6b8f26b071a98866b446a4a0a567032\", \"width\": 1200, \"height\": 628}, \"resolutions\": [{\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=108\\u0026crop=smart\\u0026auto=webp\\u0026s=1dcc9ca3a866f7b4aacfadda858fab6a5652ecbf\", \"width\": 108, \"height\": 56}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=216\\u0026crop=smart\\u0026auto=webp\\u0026s=b601492d6131461f3a1d195c82753317c0082d05\", \"width\": 216, \"height\": 113}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=320\\u0026crop=smart\\u0026auto=webp\\u0026s=9df19ec5db5047dae1fadeec15b6836f38a6a917\", \"width\": 320, \"height\": 167}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=640\\u0026crop=smart\\u0026auto=webp\\u0026s=bdc6a700886d20d02dd8e29d1f5b3a721deabb4a\", \"width\": 640, \"height\": 334}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=960\\u0026crop=smart\\u0026auto=webp\\u0026s=8cab368c12c276549af3f8245418a03d27645013\", \"width\": 960, \"height\": 502}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=1080\\u0026crop=smart\\u0026auto=webp\\u0026s=07a44ca128379479601d3de5764bee14dc1b2f74\", \"width\": 1080, \"height\": 565}], \"variants\": {}, \"id\": \"ltRJIJZJxzAbU2ofId4f5xpfVwmSPFOuFlvarmLqasI\"}], \"enabled\": false}, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"link_flair_template_id\": \"94f13282-e2e8-11e8-8291-0eae4e167256\", \"can_gild\": false, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"rte_mode\": \"markdown\", \"visited\": false, \"removed_by\": null, \"subreddit_type\": \"restricted\", \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"axdfp2\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"\", \"discussion_type\": null, \"num_comments\": 1, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": true, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/axdfp2/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/axdfp2/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1551739042.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e3m\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018415.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 1, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e3m\", \"is_robot_indexable\": true, \"report_reasons\": [\"This attribute is deprecated. Please use mod_reports and user_reports instead.\"], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e3m/test/\", \"whitelist_status\": null, \"stickied\": true, \"url\": \"https://www.reddit.com/r//comments/k62e3m/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018415.0, \"num_crossposts\": 0, \"mod_reports\": [[\"No spa5\", \"\"]], \"is_video\": false}}], \"before\": null}}, \"subreddit_id\": \"t5_7ss0q\", \"description\": \"hi\", \"primary_link_id\": \"t3_k62e2k\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"display_layout\": null, \"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "20051" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:06 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2s2TEZiXzVyejY3YlBPT19qUmFMY0lUSV9uSUxnYWgxTVZDSEtEb1BQZGJtcjBmMWZqRDlDVXpDVlo1SnpWc0NvdkdoTVE2SjVhdFZaMDVUNHRTTnNTVmRsUGNxM1lzTjJ3Qk1yQUFSTXJqRG9JU2pPOFo3aFItWWZsVXZ3Sjkzck0; Max-Age=63072000; Path=/; Domain=.reddit.com; SameSite=None; Secure", + "session_tracker=kkcjggrmhiobaofong.0.1640384826592.Z0FBQUFBQmh4a2s2NER2TGRtWVh5aWdtNmJGZHdkVTA5NVd6d3YwVnZzLVVfdHM4MVhMM240Y1R3OFV5SWg0SklhMDZkc1Jjbm5xZVRHYnJJek0tSHZpblpUNzZ5OXVyemNPeHo5YS1kV0QxX0pUU1B5cXBUTk1XOFFOQ1B1dVY2ODZlQ2p6N2NnMHo; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:27:06 GMT; secure; SameSite=None; Secure", + "csv=2; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Vary": [ + "accept-encoding" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "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": [ + "204.0" + ], + "x-ratelimit-reset": [ + "174" + ], + "x-ratelimit-used": [ + "396" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + } + } + ], + "recorded_at": "2021-12-24T16:27:06", + "version": 1 +} diff --git a/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__timeline.json b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__timeline.json new file mode 100644 index 00000000..cc7d272d --- /dev/null +++ b/tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__timeline.json @@ -0,0 +1,308 @@ +{ + "interactions": [ + { + "request": { + "body": [ + [ + "grant_type", + "refresh_token" + ], + [ + "refresh_token", + "" + ] + ], + "headers": { + "AUTHORIZATION": [ + "Basic " + ], + "Accept-Encoding": [ + "identity" + ], + "Connection": [ + "close" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://www.reddit.com/api/v1/access_token" + }, + "response": { + "body": { + "string": "{\"access_token\": \"\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"refresh_token\": \"\", \"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": [ + "427" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:23 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "edgebucket=8zFHAzZMGW0rexhboB; Domain=reddit.com; Max-Age=63071999; Path=/; secure" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "max-age=0, must-revalidate" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "292" + ], + "x-ratelimit-reset": [ + "157" + ], + "x-ratelimit-used": [ + "8" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://www.reddit.com/api/v1/access_token" + } + }, + { + "request": { + "body": [ + [ + "api_type", + "json" + ], + [ + "collection_id", + "3aa31024-711b-46b2-9514-3fd50619f6e8" + ], + [ + "display_layout", + "TIMELINE" + ] + ], + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=8zFHAzZMGW0rexhboB" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "POST", + "uri": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + }, + "response": { + "body": { + "string": "{\"json\": {\"errors\": []}}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "24" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:23 GMT" + ], + "Server": [ + "snooserv" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "X-Moose": [ + "majestic" + ], + "cache-control": [ + "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate" + ], + "expires": [ + "-1" + ], + "set-cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2xMb25Rb0NqclZYc3pZUFV3Z0libmRfWjZLMkpFR3Z4MkgtdjJhZ2ZmRnRSU2hXdnZFYkJiMkZIa3JZZDUyYlVGVWxpRXlsYWc3aE1ERUZjZGs1bEZHSnRWWEJjR2ktRDNQRGRfREFyVFRaYVY4Y1NtSU55ajczdHZWUFYtV3RfbVQ; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Sun, 24-Dec-2023 22:27:23 GMT; secure", + "redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Mon, 23-Dec-2024 22:27:23 GMT; secure", + "session_tracker=qoaenoqdlrknngcamk.0.1640384843716.Z0FBQUFBQmh4a2xMSEVBckJnelBSNVloM09fMS1VVE9yd2RrQUU4SUUtUFZUZ2JtdmJBalJYbngxZVZCZzREaTg0NjRqSTNTYzU5NlBTZEpkckFFMFhDRGM4T3hoc29pc0FYVlFkOUJBNS1ZeFppTURHT3ZXbWI5T3pjM0dhNkpwWnNOa3dESklPRXM; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:27:23 GMT; secure" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-ratelimit-remaining": [ + "187.0" + ], + "x-ratelimit-reset": [ + "157" + ], + "x-ratelimit-used": [ + "413" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/update_collection_display_layout?raw_json=1" + } + }, + { + "request": { + "body": null, + "headers": { + "Accept-Encoding": [ + "identity" + ], + "Authorization": [ + "bearer " + ], + "Cookie": [ + "edgebucket=8zFHAzZMGW0rexhboB; loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2xMb25Rb0NqclZYc3pZUFV3Z0libmRfWjZLMkpFR3Z4MkgtdjJhZ2ZmRnRSU2hXdnZFYkJiMkZIa3JZZDUyYlVGVWxpRXlsYWc3aE1ERUZjZGs1bEZHSnRWWEJjR2ktRDNQRGRfREFyVFRaYVY4Y1NtSU55ajczdHZWUFYtV3RfbVQ; redesign_optout=true; session_tracker=qoaenoqdlrknngcamk.0.1640384843716.Z0FBQUFBQmh4a2xMSEVBckJnelBSNVloM09fMS1VVE9yd2RrQUU4SUUtUFZUZ2JtdmJBalJYbngxZVZCZzREaTg0NjRqSTNTYzU5NlBTZEpkckFFMFhDRGM4T3hoc29pc0FYVlFkOUJBNS1ZeFppTURHT3ZXbWI5T3pjM0dhNkpwWnNOa3dESklPRXM" + ], + "User-Agent": [ + " Async PRAW/7.5.1.dev0 asyncprawcore/2.3.0" + ] + }, + "method": "GET", + "uri": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + }, + "response": { + "body": { + "string": "{\"sorted_links\": {\"kind\": \"Listing\", \"data\": {\"after\": null, \"dist\": 3, \"modhash\": null, \"geo_filter\": \"\", \"children\": [{\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e2k\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018413.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e2k\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e2k/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/k62e2k/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018413.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": 1554954080, \"subreddit\": \"\", \"selftext\": \"Hello peoples!\\n\\nLast week, we [asked your opinion](https://redd.it/aufll1) on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\n \\n\\nThe new rule:\\n\\n\\u003E #No Memes \\n\\u003E \\n\\u003E No memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub r/fakehistorymemes. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\n\\n##This means that all memes* now go in r/fakehistorymemes\\n^don\\u2019t ^forget ^to ^like, ^comment ^and ^subscribe!\\n\\n\\nOne thing we need to stress:\\n#There will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a ~~nasty~~ reminder to post memes in r/fakehistorymemes.\\n\\nSeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\n\\n1. It would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone's posts and all our slaves are busy doing other things.\\n2. This doesn't work for people who just view the sub through their feed as you can't sort by flair there.\\n\\nThis is where as having 2 subs allows for this functionality. \\n\\nJust to reiterate, memes now go in r/fakehistorymemes, while the OG style of post (such as those found in the top posts of all time) belong here.\\n\\n^(*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes ^please ^no and other memey things should instead be posted on r/fakehisotrymemes. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. r/fakehisotrymemes is still run by the same mod team (i.e., us)^) ^(so the rules will be similar (close to non-existent)^) ^(and we will be running similar competitions.)\\n\\nDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\n\\nThanks for being the best part of r/fakehistoryporn!\\n\\nSincerely,\\n\\n~~Meme Police~~ The r/fakehistoryporn mod team\\n\\n___\\n\\nIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the [Official Discord](https://discord.gg/vWa5BRt), [Modmail](https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn) or in the comments of this post. \\n\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"Test\", \"link_flair_richtext\": [{\"e\": \"text\", \"t\": \"test\"}], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": \"\", \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_axdfp2\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_o77bz\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": \"test\", \"can_mod_post\": true, \"score\": 1, \"approved_by\": \"\", \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"post_hint\": \"self\", \"content_categories\": null, \"is_self\": true, \"mod_note\": null, \"created\": 1551739042.0, \"link_flair_type\": \"richtext\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md\\\"\\u003E\\u003Cp\\u003EHello peoples!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ELast week, we \\u003Ca href=\\\"https://redd.it/aufll1\\\"\\u003Easked your opinion\\u003C/a\\u003E on your on whether we should move the memes to their own dedicated subreddit. The feedback we received from that post and in modmail was mostly in favor of this change. Because of this we have decided to go ahead with a trial of this new policy/rule.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThe new rule:\\u003C/p\\u003E\\n\\n\\u003Cblockquote\\u003E\\n\\u003Ch1\\u003ENo Memes\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ENo memes or images with text added to it. This includes, but not limited to: impact font, tweets, white box at the top with text added to it, comics, and other memey things. These should be posted to our sister sub \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E. The exceptions are: subtitles, signs, shirts and any other text that was already in the image are permitted.\\u003C/p\\u003E\\n\\u003C/blockquote\\u003E\\n\\n\\u003Ch2\\u003EThis means that all memes* now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003Edon\\u2019t\\u003C/sup\\u003E \\u003Csup\\u003Eforget\\u003C/sup\\u003E \\u003Csup\\u003Eto\\u003C/sup\\u003E \\u003Csup\\u003Elike,\\u003C/sup\\u003E \\u003Csup\\u003Ecomment\\u003C/sup\\u003E \\u003Csup\\u003Eand\\u003C/sup\\u003E \\u003Csup\\u003Esubscribe!\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EOne thing we need to stress:\\u003C/p\\u003E\\n\\n\\u003Ch1\\u003EThere will never be a punishment (e.g., banning) for posting memes here apart from your post being removed and receiving a \\u003Cdel\\u003Enasty\\u003C/del\\u003E reminder to post memes in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E.\\u003C/h1\\u003E\\n\\n\\u003Cp\\u003ESeveral people have suggested that we have implement a flair system so that you could just sort by a certain flair to view the content you want to see. However, there are a few issues with this: \\u003C/p\\u003E\\n\\n\\u003Col\\u003E\\n\\u003Cli\\u003EIt would break the existing filtering what years you want to see. Secondly, this would either require all users to flair their own submissions correctly (which we have learnt from other subs that this is easier said than done) or we would have to have someone around 24/7 to flair everyone\\u0026#39;s posts and all our slaves are busy doing other things.\\u003C/li\\u003E\\n\\u003Cli\\u003EThis doesn\\u0026#39;t work for people who just view the sub through their feed as you can\\u0026#39;t sort by flair there.\\u003C/li\\u003E\\n\\u003C/ol\\u003E\\n\\n\\u003Cp\\u003EThis is where as having 2 subs allows for this functionality. \\u003C/p\\u003E\\n\\n\\u003Cp\\u003EJust to reiterate, memes now go in \\u003Ca href=\\\"/r/fakehistorymemes\\\"\\u003Er/fakehistorymemes\\u003C/a\\u003E, while the OG style of post (such as those found in the top posts of all time) belong here.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Csup\\u003E*We classify memes as something that has text added to the picture to make it funny. This means that subtitles, signs, shirts and any other text that was already in the image are permitted while things like comics, conventional impact font memes \\u003Csup\\u003Eplease\\u003C/sup\\u003E \\u003Csup\\u003Eno\\u003C/sup\\u003E and other memey things should instead be posted on \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E. It is a little difficult to designate strict rules on exactly what is and isn\\u2019t a meme so it will be up to the moderators to decide what is a meme. However the above classification should be a good guideline (if you have something you want to post it should be reasonably simple to know which sub it should go in. \\u003Ca href=\\\"/r/fakehisotrymemes\\\"\\u003Er/fakehisotrymemes\\u003C/a\\u003E is still run by the same mod team (i.e., us\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eso the rules will be similar (close to non-existent\\u003C/sup\\u003E\\u003Csup\\u003E)\\u003C/sup\\u003E \\u003Csup\\u003Eand we will be running similar competitions.\\u003C/sup\\u003E\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EDepending on the feedback we receive and the quality of the sub, we will revisit this change and see if it is a beneficial change.\\u003C/p\\u003E\\n\\n\\u003Cp\\u003EThanks for being the best part of \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E!\\u003C/p\\u003E\\n\\n\\u003Cp\\u003ESincerely,\\u003C/p\\u003E\\n\\n\\u003Cp\\u003E\\u003Cdel\\u003EMeme Police\\u003C/del\\u003E The \\u003Ca href=\\\"/r/fakehistoryporn\\\"\\u003Er/fakehistoryporn\\u003C/a\\u003E mod team\\u003C/p\\u003E\\n\\n\\u003Chr/\\u003E\\n\\n\\u003Cp\\u003EIf you have any more questions, comments or concerns don\\u2019t hesitate to contact us in the \\u003Ca href=\\\"https://discord.gg/vWa5BRt\\\"\\u003EOfficial Discord\\u003C/a\\u003E, \\u003Ca href=\\\"https://www.reddit.com/message/compose?to=%2Fr%2Ffakehistoryporn\\\"\\u003EModmail\\u003C/a\\u003E or in the comments of this post. \\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"likes\": true, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": false, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"preview\": {\"images\": [{\"source\": {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?auto=webp\\u0026s=ceaef94ac6b8f26b071a98866b446a4a0a567032\", \"width\": 1200, \"height\": 628}, \"resolutions\": [{\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=108\\u0026crop=smart\\u0026auto=webp\\u0026s=1dcc9ca3a866f7b4aacfadda858fab6a5652ecbf\", \"width\": 108, \"height\": 56}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=216\\u0026crop=smart\\u0026auto=webp\\u0026s=b601492d6131461f3a1d195c82753317c0082d05\", \"width\": 216, \"height\": 113}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=320\\u0026crop=smart\\u0026auto=webp\\u0026s=9df19ec5db5047dae1fadeec15b6836f38a6a917\", \"width\": 320, \"height\": 167}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=640\\u0026crop=smart\\u0026auto=webp\\u0026s=bdc6a700886d20d02dd8e29d1f5b3a721deabb4a\", \"width\": 640, \"height\": 334}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=960\\u0026crop=smart\\u0026auto=webp\\u0026s=8cab368c12c276549af3f8245418a03d27645013\", \"width\": 960, \"height\": 502}, {\"url\": \"https://external-preview.redd.it/x5JRIeY60pIR1fazPb0ljVkUi8PialslEUYlEhswmYk.jpg?width=1080\\u0026crop=smart\\u0026auto=webp\\u0026s=07a44ca128379479601d3de5764bee14dc1b2f74\", \"width\": 1080, \"height\": 565}], \"variants\": {}, \"id\": \"ltRJIJZJxzAbU2ofId4f5xpfVwmSPFOuFlvarmLqasI\"}], \"enabled\": false}, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"link_flair_template_id\": \"94f13282-e2e8-11e8-8291-0eae4e167256\", \"can_gild\": false, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"rte_mode\": \"markdown\", \"visited\": false, \"removed_by\": null, \"subreddit_type\": \"restricted\", \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 0, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"axdfp2\", \"is_robot_indexable\": true, \"report_reasons\": [], \"author\": \"\", \"discussion_type\": null, \"num_comments\": 1, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": true, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/axdfp2/test/\", \"whitelist_status\": null, \"stickied\": false, \"url\": \"https://www.reddit.com/r//comments/axdfp2/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1551739042.0, \"num_crossposts\": 0, \"mod_reports\": [], \"is_video\": false}}, {\"kind\": \"t3\", \"data\": {\"author_flair_background_color\": null, \"approved_at_utc\": null, \"subreddit\": \"\", \"selftext\": \"\", \"user_reports\": [], \"saved\": false, \"mod_reason_title\": null, \"gilded\": 0, \"clicked\": false, \"title\": \"test\", \"link_flair_richtext\": [], \"subreddit_name_prefixed\": \"r/\", \"collections\": [{\"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"description\": \"hi\", \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"subreddit_id\": \"t5_7ss0q\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675, \"display_layout\": \"GALLERY\"}], \"hidden\": false, \"pwls\": null, \"link_flair_css_class\": null, \"downs\": 0, \"thumbnail_height\": null, \"top_awarded_type\": null, \"parent_whitelist_status\": null, \"hide_score\": false, \"name\": \"t3_k62e3m\", \"quarantine\": false, \"link_flair_text_color\": \"dark\", \"upvote_ratio\": 1.0, \"ignore_reports\": false, \"ups\": 1, \"domain\": \"self.\", \"media_embed\": {}, \"thumbnail_width\": null, \"author_flair_template_id\": null, \"is_original_content\": false, \"author_fullname\": \"t2_6l4z3\", \"secure_media\": null, \"is_reddit_media_domain\": false, \"is_meta\": false, \"category\": null, \"secure_media_embed\": {}, \"link_flair_text\": null, \"can_mod_post\": true, \"score\": 1, \"approved_by\": null, \"is_created_from_ads_ui\": false, \"author_premium\": true, \"thumbnail\": \"self\", \"edited\": false, \"author_flair_css_class\": null, \"author_flair_richtext\": [], \"gildings\": {}, \"content_categories\": null, \"is_self\": true, \"subreddit_type\": \"restricted\", \"created\": 1607018415.0, \"link_flair_type\": \"text\", \"wls\": null, \"removed_by_category\": null, \"banned_by\": null, \"author_flair_type\": \"text\", \"total_awards_received\": 0, \"allow_live_comments\": false, \"selftext_html\": null, \"likes\": null, \"suggested_sort\": null, \"banned_at_utc\": null, \"view_count\": null, \"archived\": false, \"no_follow\": true, \"spam\": false, \"is_crosspostable\": true, \"pinned\": false, \"over_18\": false, \"all_awardings\": [], \"awarders\": [], \"media_only\": false, \"can_gild\": true, \"removed\": false, \"spoiler\": false, \"locked\": false, \"author_flair_text\": null, \"treatment_tags\": [], \"visited\": false, \"removed_by\": null, \"mod_note\": null, \"distinguished\": null, \"subreddit_id\": \"t5_7ss0q\", \"author_is_blocked\": false, \"mod_reason_by\": null, \"num_reports\": 1, \"removal_reason\": null, \"link_flair_background_color\": \"\", \"id\": \"k62e3m\", \"is_robot_indexable\": true, \"report_reasons\": [\"This attribute is deprecated. Please use mod_reports and user_reports instead.\"], \"author\": \"AutoModerator\", \"discussion_type\": null, \"num_comments\": 0, \"send_replies\": true, \"media\": null, \"contest_mode\": false, \"author_patreon_flair\": false, \"approved\": false, \"author_flair_text_color\": null, \"permalink\": \"/r//comments/k62e3m/test/\", \"whitelist_status\": null, \"stickied\": true, \"url\": \"https://www.reddit.com/r//comments/k62e3m/test/\", \"subreddit_subscribers\": 14, \"created_utc\": 1607018415.0, \"num_crossposts\": 0, \"mod_reports\": [[\"No spa5\", \"\"]], \"is_video\": false}}], \"before\": null}}, \"subreddit_id\": \"t5_7ss0q\", \"description\": \"hi\", \"primary_link_id\": \"t3_k62e2k\", \"author_name\": \"\", \"collection_id\": \"3aa31024-711b-46b2-9514-3fd50619f6e8\", \"display_layout\": \"TIMELINE\", \"permalink\": \"https://www.reddit.com/r//collection/3aa31024-711b-46b2-9514-3fd50619f6e8\", \"link_ids\": [\"t3_k62e2k\", \"t3_axdfp2\", \"t3_k62e3m\"], \"title\": \"test\", \"created_at_utc\": 1593317212.619, \"author_id\": \"t2_o77bz\", \"last_update_utc\": 1640282842.675}" + }, + "headers": { + "Accept-Ranges": [ + "bytes" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "20057" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Date": [ + "Fri, 24 Dec 2021 22:27:24 GMT" + ], + "Server": [ + "snooserv" + ], + "Set-Cookie": [ + "loid=0000000000000o77bz.2.1434669370561.Z0FBQUFBQmh4a2xMb25Rb0NqclZYc3pZUFV3Z0libmRfWjZLMkpFR3Z4MkgtdjJhZ2ZmRnRSU2hXdnZFYkJiMkZIa3JZZDUyYlVGVWxpRXlsYWc3aE1ERUZjZGs1bEZHSnRWWEJjR2ktRDNQRGRfREFyVFRaYVY4Y1NtSU55ajczdHZWUFYtV3RfbVQ; Max-Age=63072000; Path=/; Domain=.reddit.com; SameSite=None; Secure", + "session_tracker=qoaenoqdlrknngcamk.0.1640384843859.Z0FBQUFBQmh4a2xMY01rdkVCOWg4NUd0Tk1TQUs5a2FLU0VwbUN0MjJENmNOM1o0RDJMUjJCTFlLOG5IQVBFSGpMZGFXQUEzQVJNSlZYX1NSYlpVVGZNZGU1ZWh6TGdmeVlIaXc0djNKQ3RNdkkxakRYSVZfLWFNdGhiTU5TU0tuYnY0RUl5NXdWNjM; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 25-Dec-2021 00:27:23 GMT; secure; SameSite=None; Secure", + "csv=2; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None" + ], + "Strict-Transport-Security": [ + "max-age=15552000; includeSubDomains; preload" + ], + "Vary": [ + "accept-encoding" + ], + "Via": [ + "1.1 varnish" + ], + "X-Clacks-Overhead": [ + "GNU Terry Pratchett" + ], + "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": [ + "185.0" + ], + "x-ratelimit-reset": [ + "157" + ], + "x-ratelimit-used": [ + "415" + ], + "x-ua-compatible": [ + "IE=edge" + ], + "x-xss-protection": [ + "1; mode=block" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "url": "https://oauth.reddit.com/api/v1/collections/collection?collection_id=3aa31024-711b-46b2-9514-3fd50619f6e8&include_links=true&raw_json=1" + } + } + ], + "recorded_at": "2021-12-24T16:27:24", + "version": 1 +} diff --git a/tests/integration/models/reddit/test_collections.py b/tests/integration/models/reddit/test_collections.py index 5dcc3ebd..8142b3dd 100644 --- a/tests/integration/models/reddit/test_collections.py +++ b/tests/integration/models/reddit/test_collections.py @@ -3,7 +3,7 @@ import pytest from asynctest import mock -from asyncpraw.exceptions import ClientException +from asyncpraw.exceptions import ClientException, RedditAPIException from asyncpraw.models import Submission from ... import IntegrationTest @@ -144,6 +144,80 @@ async def test_update_description(self, _): await collection.mod.update_description(new_description) assert new_description == collection.description + @mock.patch("asyncio.sleep", return_value=None) + async def test_update_display_layout__empty_string(self, _): + self.reddit.read_only = False + uuid = "3aa31024-711b-46b2-9514-3fd50619f6e8" + empty_string = "" + with self.use_cassette(): + subreddit = await self.reddit.subreddit(pytest.placeholders.test_subreddit) + collection = await subreddit.collections(uuid, fetch=False) + await collection.mod.update_display_layout(empty_string) + await collection.load() + assert empty_string != collection.display_layout + assert collection.display_layout is None + + @mock.patch("asyncio.sleep", return_value=None) + async def test_update_display_layout__gallery(self, _): + self.reddit.read_only = False + uuid = "3aa31024-711b-46b2-9514-3fd50619f6e8" + gallery_layout = "GALLERY" + with self.use_cassette(): + subreddit = await self.reddit.subreddit(pytest.placeholders.test_subreddit) + collection = await subreddit.collections(uuid, fetch=False) + await collection.mod.update_display_layout(gallery_layout) + await collection.load() + assert gallery_layout == collection.display_layout + + @mock.patch("asyncio.sleep", return_value=None) + async def test_update_display_layout__invalid_layout(self, _): + self.reddit.read_only = False + uuid = "3aa31024-711b-46b2-9514-3fd50619f6e8" + invalid_layout = "colossal atom cake" + with self.use_cassette(): + subreddit = await self.reddit.subreddit(pytest.placeholders.test_subreddit) + collection = await subreddit.collections(uuid, fetch=False) + with pytest.raises(RedditAPIException): + await collection.mod.update_display_layout(invalid_layout) + await collection.load() + assert collection.display_layout is None + + @mock.patch("asyncio.sleep", return_value=None) + async def test_update_display_layout__lowercase(self, _): + self.reddit.read_only = False + uuid = "3aa31024-711b-46b2-9514-3fd50619f6e8" + lowercase_gallery_layout = "gallery" + with self.use_cassette(): + subreddit = await self.reddit.subreddit(pytest.placeholders.test_subreddit) + collection = await subreddit.collections(uuid, fetch=False) + with pytest.raises(RedditAPIException): + await collection.mod.update_display_layout(lowercase_gallery_layout) + await collection.load() + assert collection.display_layout is None + + @mock.patch("asyncio.sleep", return_value=None) + async def test_update_display_layout__none(self, _): + self.reddit.read_only = False + uuid = "3aa31024-711b-46b2-9514-3fd50619f6e8" + with self.use_cassette(): + subreddit = await self.reddit.subreddit(pytest.placeholders.test_subreddit) + collection = await subreddit.collections(uuid, fetch=False) + await collection.mod.update_display_layout(None) + await collection.load() + assert collection.display_layout is None + + @mock.patch("asyncio.sleep", return_value=None) + async def test_update_display_layout__timeline(self, _): + self.reddit.read_only = False + uuid = "3aa31024-711b-46b2-9514-3fd50619f6e8" + timeline_layout = "TIMELINE" + with self.use_cassette(): + subreddit = await self.reddit.subreddit(pytest.placeholders.test_subreddit) + collection = await subreddit.collections(uuid, fetch=False) + await collection.mod.update_display_layout(timeline_layout) + await collection.load() + assert timeline_layout == collection.display_layout + @mock.patch("asyncio.sleep", return_value=None) async def test_update_title(self, _): self.reddit.read_only = False