redditkit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.md +22 -0
- data/README.md +155 -0
- data/Rakefile +8 -0
- data/lib/redditkit.rb +26 -0
- data/lib/redditkit/base.rb +60 -0
- data/lib/redditkit/client.rb +142 -0
- data/lib/redditkit/client/account.rb +73 -0
- data/lib/redditkit/client/apps.rb +63 -0
- data/lib/redditkit/client/captcha.rb +36 -0
- data/lib/redditkit/client/comments.rb +54 -0
- data/lib/redditkit/client/flair.rb +148 -0
- data/lib/redditkit/client/links.rb +134 -0
- data/lib/redditkit/client/miscellaneous.rb +50 -0
- data/lib/redditkit/client/moderation.rb +179 -0
- data/lib/redditkit/client/multireddits.rb +207 -0
- data/lib/redditkit/client/private_messages.rb +74 -0
- data/lib/redditkit/client/search.rb +25 -0
- data/lib/redditkit/client/subreddits.rb +120 -0
- data/lib/redditkit/client/users.rb +109 -0
- data/lib/redditkit/client/utilities.rb +137 -0
- data/lib/redditkit/client/voting.rb +41 -0
- data/lib/redditkit/client/wiki.rb +83 -0
- data/lib/redditkit/comment.rb +54 -0
- data/lib/redditkit/creatable.rb +17 -0
- data/lib/redditkit/error.rb +111 -0
- data/lib/redditkit/link.rb +140 -0
- data/lib/redditkit/moderator_action.rb +19 -0
- data/lib/redditkit/multireddit.rb +32 -0
- data/lib/redditkit/multireddit_description.rb +14 -0
- data/lib/redditkit/paginated_response.rb +22 -0
- data/lib/redditkit/private_message.rb +27 -0
- data/lib/redditkit/response/parse_json.rb +29 -0
- data/lib/redditkit/response/raise_error.rb +21 -0
- data/lib/redditkit/subreddit.rb +86 -0
- data/lib/redditkit/thing.rb +20 -0
- data/lib/redditkit/user.rb +30 -0
- data/lib/redditkit/version.rb +19 -0
- data/lib/redditkit/votable.rb +37 -0
- data/redditkit.gemspec +25 -0
- data/spec/cassettes/RedditKit_Client/should_raise_an_error_with_invalid_credentials.yml +39 -0
- data/spec/cassettes/RedditKit_Client_Account/_sign_in/signs_the_user_in.yml +132 -0
- data/spec/cassettes/RedditKit_Client_Account/_update_session/updates_the_current_session.yml +133 -0
- data/spec/cassettes/RedditKit_Client_Captcha/_captcha_url/returns_a_CAPTCHA_url_from_an_identifier.yml +38 -0
- data/spec/cassettes/RedditKit_Client_Captcha/_needs_captcha_/checks_if_the_current_account_needs_a_CAPTCHA.yml +44 -0
- data/spec/cassettes/RedditKit_Client_Captcha/_new_captcha_identifier/returns_a_new_CAPTCHA_identifier.yml +38 -0
- data/spec/cassettes/RedditKit_Client_Comments/_comment/requests_the_correct_resource.yml +47 -0
- data/spec/cassettes/RedditKit_Client_Comments/_comments/with_a_RedditKit_Link/returns_comments_on_a_link.yml +140 -0
- data/spec/cassettes/RedditKit_Client_Comments/_comments/with_a_link_identifier/returns_comments_on_a_link.yml +89 -0
- data/spec/cassettes/RedditKit_Client_Comments/_submit_comment/requests_the_correct_resource.yml +313 -0
- data/spec/cassettes/RedditKit_Client_Flair/_apply_flair_template/clears_flair_templates.yml +52 -0
- data/spec/cassettes/RedditKit_Client_Flair/_clear_flair_templates/clears_flair_templates.yml +49 -0
- data/spec/cassettes/RedditKit_Client_Flair/_create_flair_template/creates_a_flair_template.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Flair/_create_flair_template/raises_InvalidClassName.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Flair/_create_flair_template/raises_TooManyClassNames.yml +47 -0
- data/spec/cassettes/RedditKit_Client_Flair/_delete_user_flair/requests_the_correct_resource.yml +60 -0
- data/spec/cassettes/RedditKit_Client_Flair/_flair_list/returns_the_list_of_flair.yml +44 -0
- data/spec/cassettes/RedditKit_Client_Flair/_set_flair/requests_the_correct_resource.yml +49 -0
- data/spec/cassettes/RedditKit_Client_Flair/_set_flair_options/sets_flair_options.yml +49 -0
- data/spec/cassettes/RedditKit_Client_Flair/_set_flair_with_csv/requests_the_correct_resource.yml +51 -0
- data/spec/cassettes/RedditKit_Client_Flair/_toggle_flair/requests_the_correct_resource.yml +49 -0
- data/spec/cassettes/RedditKit_Client_Links/_front_page/requests_the_correct_category.yml +498 -0
- data/spec/cassettes/RedditKit_Client_Links/_front_page/requests_the_correct_resource.yml +603 -0
- data/spec/cassettes/RedditKit_Client_Links/_hide/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Links/_link/returns_a_link.yml +55 -0
- data/spec/cassettes/RedditKit_Client_Links/_links/contains_pagination_information.yml +402 -0
- data/spec/cassettes/RedditKit_Client_Links/_links/requests_a_certain_number_of_links.yml +186 -0
- data/spec/cassettes/RedditKit_Client_Links/_links/requests_front_page_links_if_no_subreddit_is_present.yml +603 -0
- data/spec/cassettes/RedditKit_Client_Links/_links/requests_links_with_the_correct_time_frame.yml +375 -0
- data/spec/cassettes/RedditKit_Client_Links/_links/requests_the_correct_subreddit_and_category.yml +402 -0
- data/spec/cassettes/RedditKit_Client_Links/_links_with_domain/returns_links_with_a_specific_domain.yml +99 -0
- data/spec/cassettes/RedditKit_Client_Links/_mark_nsfw/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Links/_random_link/returns_a_random_link.yml +91 -0
- data/spec/cassettes/RedditKit_Client_Links/_submit/raises_RedditKit_InvalidCaptcha_if_no_CAPTCHA_is_filled_out.yml +54 -0
- data/spec/cassettes/RedditKit_Client_Links/_unhide/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Links/_unmark_nsfw/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Miscellaneous/_delete/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Miscellaneous/_edit/requests_the_correct_resource.yml +52 -0
- data/spec/cassettes/RedditKit_Client_Miscellaneous/_save/saves_an_object.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Miscellaneous/_unsave/unsaves_an_object.yml +89 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_accept_moderator_invitation/requests_the_correct_resource.yml +53 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_ban/requests_the_correct_resource.yml +103 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_contributors_to_subreddit/requests_the_correct_resource.yml +47 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_ignore_reports/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_moderation_log/returns_RedditKit_ModeratorAction_objects.yml +153 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_moderators_of_subreddit/requests_the_correct_resource.yml +48 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_reset_subreddit_header/requests_the_correct_resource.yml +55 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_set_contest_mode/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_set_sticky_post/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_unban/requests_the_correct_resource.yml +54 -0
- data/spec/cassettes/RedditKit_Client_Moderation/_unignore_reports/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_add_subreddit_to_multireddit/adds_a_subreddit_to_a_multireddit.yml +177 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_create_multireddit/creates_a_multireddit.yml +137 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_create_multireddit/raises_RedditKit_Conflict_when_using_an_existing_name.yml +133 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_delete_multireddit/deletes_a_multireddit.yml +134 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit/with_a_path/returns_a_multireddit.yml +39 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit/without_a_path/returns_a_multireddit.yml +39 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_multireddit/returns_a_multireddit_description.yml +81 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_username_and_multireddit_name/returns_a_multireddit_description.yml +45 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_my_multireddits/return_s_the_user_s_multireddits.yml +47 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_remove_subreddit_from_multireddit/removes_a_subreddit_from_a_multireddit.yml +175 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_rename_multireddit/renames_a_multireddit.yml +134 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_set_multireddit_description/returns_a_multireddit_description.yml +48 -0
- data/spec/cassettes/RedditKit_Client_Multireddits/_update_multireddit/updates_a_multireddit.yml +184 -0
- data/spec/cassettes/RedditKit_Client_PrivateMessages/_block_author_of_message/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_PrivateMessages/_mark_as_read/requests_the_correct_resource.yml +51 -0
- data/spec/cassettes/RedditKit_Client_PrivateMessages/_mark_as_unread/requests_the_correct_resource.yml +51 -0
- data/spec/cassettes/RedditKit_Client_PrivateMessages/_messages/requests_the_correct_resource.yml +187 -0
- data/spec/cassettes/RedditKit_Client_PrivateMessages/_unblock/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Search/_search/restricts_searches_to_a_specific_subreddit.yml +878 -0
- data/spec/cassettes/RedditKit_Client_Search/_search/returns_a_specific_number_of_results.yml +130 -0
- data/spec/cassettes/RedditKit_Client_Search/_search/returns_search_results.yml +844 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_random_subreddit/returns_a_random_subreddit.yml +181 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_recommended_subreddits/returns_subreddit_names.yml +37 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_search_subreddits_by_name/returns_subreddit_names.yml +875 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_subreddit/returns_a_specified_subreddit.yml +100 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_subreddits/returns_a_specified_number_of_subreddits.yml +505 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_subreddits/returns_subreddits_from_a_specific_category.yml +510 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_subreddits_by_topic/returns_subreddit_names.yml +41 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_subscribe/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_a_specified_number_of_subreddits.yml +415 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_subreddits_from_a_specific_category.yml +58 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_the_user_s_subscribed_subreddits.yml +3469 -0
- data/spec/cassettes/RedditKit_Client_Subreddits/_unsubscribe/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Users/_friends/returns_the_user_s_friends.yml +48 -0
- data/spec/cassettes/RedditKit_Client_Users/_my_content/returns_the_user_s_content.yml +60 -0
- data/spec/cassettes/RedditKit_Client_Users/_user/requests_the_correct_resource.yml +48 -0
- data/spec/cassettes/RedditKit_Client_Users/_user/returns_a_specified_user.yml +48 -0
- data/spec/cassettes/RedditKit_Client_Users/_user/returns_the_authenticated_user.yml +48 -0
- data/spec/cassettes/RedditKit_Client_Users/_user_content/returns_the_user_s_content.yml +41 -0
- data/spec/cassettes/RedditKit_Client_Users/_username_available_/returns_false_for_an_unavailable_username.yml +36 -0
- data/spec/cassettes/RedditKit_Client_Users/_username_available_/returns_true_for_an_available_username.yml +36 -0
- data/spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_comment_full_name_passed/downvotes_the_comment.yml +100 -0
- data/spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_comment_passed/downvotes_the_comment.yml +154 -0
- data/spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_link_full_name_passed/downvotes_the_link.yml +106 -0
- data/spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_link_passed/downvotes_the_link.yml +166 -0
- data/spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_comment_full_name_passed/upvotes_the_comment.yml +100 -0
- data/spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_comment_passed/upvotes_the_comment.yml +154 -0
- data/spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_link_full_name_passed/upvotes_the_link.yml +106 -0
- data/spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_link_passed/upvotes_the_link.yml +166 -0
- data/spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_comment_full_name_passed/withdraws_the_vote_on_the_comment.yml +154 -0
- data/spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_comment_passed/withdraws_the_vote_on_the_comment.yml +208 -0
- data/spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_link_full_name_passed/withdraws_the_vote_on_the_link.yml +166 -0
- data/spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_link_passed/withdraws_the_vote_on_the_link.yml +226 -0
- data/spec/cassettes/RedditKit_Client_Wiki/_add_wiki_editor/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Wiki/_edit_wiki_page/requests_the_correct_resource.yml +48 -0
- data/spec/cassettes/RedditKit_Client_Wiki/_hide_wiki_revision/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Wiki/_remove_wiki_editor/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Client_Wiki/_revert_to_revision/requests_the_correct_resource.yml +46 -0
- data/spec/cassettes/RedditKit_Comment/should_not_be_deleted_if_neither_author_and_comment_attributes_are_set_to_deleted_.yml +90 -0
- data/spec/cassettes/RedditKit_Comment/should_return_replies.yml +90 -0
- data/spec/cassettes/authenticated_client.yml +87 -0
- data/spec/redditkit/base_spec.rb +45 -0
- data/spec/redditkit/client/account_spec.rb +50 -0
- data/spec/redditkit/client/apps_spec.rb +58 -0
- data/spec/redditkit/client/captcha_spec.rb +30 -0
- data/spec/redditkit/client/comments_spec.rb +40 -0
- data/spec/redditkit/client/flair_spec.rb +92 -0
- data/spec/redditkit/client/links_spec.rb +103 -0
- data/spec/redditkit/client/miscellaneous_spec.rb +40 -0
- data/spec/redditkit/client/moderation_spec.rb +141 -0
- data/spec/redditkit/client/multireddits_spec.rb +158 -0
- data/spec/redditkit/client/private_messages_spec.rb +51 -0
- data/spec/redditkit/client/search_spec.rb +25 -0
- data/spec/redditkit/client/subreddits_spec.rb +83 -0
- data/spec/redditkit/client/users_spec.rb +92 -0
- data/spec/redditkit/client/voting_spec.rb +99 -0
- data/spec/redditkit/client/wiki_spec.rb +40 -0
- data/spec/redditkit/client_spec.rb +46 -0
- data/spec/redditkit/comment_spec.rb +26 -0
- data/spec/redditkit/creatable_spec.rb +24 -0
- data/spec/redditkit/error_spec.rb +61 -0
- data/spec/redditkit/link_spec.rb +33 -0
- data/spec/redditkit/multireddit_spec.rb +27 -0
- data/spec/redditkit/paginated_response_spec.rb +23 -0
- data/spec/redditkit/thing_spec.rb +18 -0
- data/spec/redditkit/votable_spec.rb +52 -0
- data/spec/redditkit_spec.rb +21 -0
- data/spec/spec_helper.rb +124 -0
- metadata +390 -0
@@ -0,0 +1,89 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.reddit.com/comments/1n002d.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=UTF-8
|
23
|
+
Last-Modified:
|
24
|
+
- Tue, 29 Oct 2013 20:08:26 GMT
|
25
|
+
Server:
|
26
|
+
- "'; DROP TABLE servertypes; --"
|
27
|
+
Vary:
|
28
|
+
- accept-encoding
|
29
|
+
Cache-Control:
|
30
|
+
- private, must-revalidate, max-age=0
|
31
|
+
Date:
|
32
|
+
- Sun, 10 Nov 2013 19:54:45 GMT
|
33
|
+
Content-Length:
|
34
|
+
- '3565'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: "[{\"kind\": \"Listing\", \"data\": {\"modhash\": \"\", \"children\":
|
40
|
+
[{\"kind\": \"t3\", \"data\": {\"domain\": \"self.RedditKitTesting\", \"banned_by\":
|
41
|
+
null, \"media_embed\": {}, \"subreddit\": \"RedditKitTesting\", \"selftext_html\":
|
42
|
+
\"<!-- SC_OFF --><div class=\\\"md\\\"><p>Here&#39;s
|
43
|
+
a test self post. This will never be deleted and can be used to test voting/saving/hiding.</p>\\n</div><!--
|
44
|
+
SC_ON -->\", \"selftext\": \"Here's a test self post. This will never be
|
45
|
+
deleted and can be used to test voting/saving/hiding.\", \"likes\": null,
|
46
|
+
\"secure_media\": null, \"link_flair_text\": \"Test flair\", \"id\": \"1n002d\",
|
47
|
+
\"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false, \"author\":
|
48
|
+
\"samsymons\", \"media\": null, \"score\": 1, \"approved_by\": null, \"over_18\":
|
49
|
+
false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2ylc5\",
|
50
|
+
\"edited\": 1382729104.0, \"link_flair_css_class\": \"testclass\", \"author_flair_css_class\":
|
51
|
+
null, \"downs\": 1, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/RedditKitTesting/comments/1n002d/test_self_post/\",
|
52
|
+
\"name\": \"t3_1n002d\", \"created\": 1379988320.0, \"url\": \"http://www.reddit.com/r/RedditKitTesting/comments/1n002d/test_self_post/\",
|
53
|
+
\"author_flair_text\": null, \"title\": \"Test self post\", \"created_utc\":
|
54
|
+
1379984720.0, \"ups\": 2, \"num_comments\": 3, \"visited\": false, \"num_reports\":
|
55
|
+
null, \"distinguished\": null}}], \"after\": null, \"before\": null}}, {\"kind\":
|
56
|
+
\"Listing\", \"data\": {\"modhash\": \"\", \"children\": [{\"kind\": \"t1\",
|
57
|
+
\"data\": {\"subreddit_id\": \"t5_2ylc5\", \"banned_by\": null, \"subreddit\":
|
58
|
+
\"RedditKitTesting\", \"likes\": null, \"replies\": {\"kind\": \"Listing\",
|
59
|
+
\"data\": {\"modhash\": \"\", \"children\": [{\"kind\": \"t1\", \"data\":
|
60
|
+
{\"subreddit_id\": \"t5_2ylc5\", \"banned_by\": null, \"subreddit\": \"RedditKitTesting\",
|
61
|
+
\"likes\": null, \"replies\": {\"kind\": \"Listing\", \"data\": {\"modhash\":
|
62
|
+
\"\", \"children\": [{\"kind\": \"t1\", \"data\": {\"subreddit_id\": \"t5_2ylc5\",
|
63
|
+
\"banned_by\": null, \"subreddit\": \"RedditKitTesting\", \"likes\": null,
|
64
|
+
\"replies\": \"\", \"id\": \"cd2cxbf\", \"gilded\": 0, \"author\": \"samsymons\",
|
65
|
+
\"parent_id\": \"t1_ccs9m3u\", \"approved_by\": null, \"body\": \"Further
|
66
|
+
reply!\", \"edited\": false, \"author_flair_css_class\": null, \"downs\":
|
67
|
+
0, \"body_html\": \"<div class=\\\"md\\\"><p>Further reply!</p>\\n</div>\",
|
68
|
+
\"link_id\": \"t3_1n002d\", \"score_hidden\": false, \"name\": \"t1_cd2cxbf\",
|
69
|
+
\"created\": 1383080906.0, \"author_flair_text\": null, \"created_utc\": 1383077306.0,
|
70
|
+
\"distinguished\": null, \"num_reports\": null, \"ups\": 1}}], \"after\":
|
71
|
+
null, \"before\": null}}, \"id\": \"ccs9m3u\", \"gilded\": 0, \"author\":
|
72
|
+
\"samsymons\", \"parent_id\": \"t1_cce66qf\", \"approved_by\": null, \"body\":
|
73
|
+
\"Test reply.\", \"edited\": false, \"author_flair_css_class\": null, \"downs\":
|
74
|
+
0, \"body_html\": \"<div class=\\\"md\\\"><p>Test reply.</p>\\n</div>\",
|
75
|
+
\"link_id\": \"t3_1n002d\", \"score_hidden\": false, \"name\": \"t1_ccs9m3u\",
|
76
|
+
\"created\": 1381864849.0, \"author_flair_text\": null, \"created_utc\": 1381861249.0,
|
77
|
+
\"distinguished\": null, \"num_reports\": null, \"ups\": 1}}], \"after\":
|
78
|
+
null, \"before\": null}}, \"id\": \"cce66qf\", \"gilded\": 0, \"author\":
|
79
|
+
\"samsymons\", \"parent_id\": \"t3_1n002d\", \"approved_by\": null, \"body\":
|
80
|
+
\"Here's a test comment which will also never be deleted.\", \"edited\": false,
|
81
|
+
\"author_flair_css_class\": null, \"downs\": 1, \"body_html\": \"<div class=\\\"md\\\"><p>Here&#39;s
|
82
|
+
a test comment which will also never be deleted.</p>\\n</div>\",
|
83
|
+
\"link_id\": \"t3_1n002d\", \"score_hidden\": false, \"name\": \"t1_cce66qf\",
|
84
|
+
\"created\": 1379988702.0, \"author_flair_text\": null, \"created_utc\": 1379985102.0,
|
85
|
+
\"distinguished\": null, \"num_reports\": null, \"ups\": 2}}], \"after\":
|
86
|
+
null, \"before\": null}}]"
|
87
|
+
http_version:
|
88
|
+
recorded_at: Sun, 10 Nov 2013 19:54:44 GMT
|
89
|
+
recorded_with: VCR 2.6.0
|
data/spec/cassettes/RedditKit_Client_Comments/_submit_comment/requests_the_correct_resource.yml
ADDED
@@ -0,0 +1,313 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.reddit.com/api/comment
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: text=Comment+submission+test&thing_id=t3_1n002d&api_type=json
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Cookie:
|
13
|
+
- reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
|
14
|
+
X-Modhash:
|
15
|
+
- 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
|
16
|
+
Content-Type:
|
17
|
+
- application/x-www-form-urlencoded
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
Accept:
|
21
|
+
- "*/*"
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=UTF-8
|
29
|
+
Cache-Control:
|
30
|
+
- no-cache
|
31
|
+
Pragma:
|
32
|
+
- no-cache
|
33
|
+
Server:
|
34
|
+
- "'; DROP TABLE servertypes; --"
|
35
|
+
Vary:
|
36
|
+
- accept-encoding
|
37
|
+
Date:
|
38
|
+
- Sun, 10 Nov 2013 19:54:46 GMT
|
39
|
+
Content-Length:
|
40
|
+
- '13444'
|
41
|
+
Connection:
|
42
|
+
- keep-alive
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: "{\"json\": {\"errors\": [], \"data\": {\"things\": [{\"kind\": \"t1\",
|
46
|
+
\"data\": {\"parent\": \"t3_1n002d\", \"content\": \"\\n\\n\\n\\n\\n\\n\\n\\n<div
|
47
|
+
class=\\\"\\n \\n thing id-t1_cdb6jhx\\n \\n \\n odd\\n comment \\\"\\n
|
48
|
+
\ onclick=\\\"click_thing(this)\\\"\\n \\n \\n data-fullname=\\\"t1_cdb6jhx\\\"\\n\\n\\n
|
49
|
+
data-ups=\\\"1\\\" data-downs=\\\"0\\\"\\n>\\n <p class=\\\"parent\\\">\\n
|
50
|
+
\ \\n \\n\\n <a name=\\\"cdb6jhx\\\"></a>\\n\\n </p>\\n
|
51
|
+
\ \\n\\n \\n \\n\\n \\n <div class=\\\"midcol likes\\\" \\n >\\n
|
52
|
+
\ \\n\\n <div class=\\\"arrow upmod login-required\\\"\\n onclick=\\\"$(this).vote(r.config.vote_hash,
|
53
|
+
null, event)\\\"\\n role=\\\"button\\\"\\n aria-label=\\\"upvote\\\"\\n
|
54
|
+
\ tabindex=\\\"0\\\"\\n >\\n </div>\\n\\n \\n\\n <div
|
55
|
+
class=\\\"arrow down login-required\\\"\\n onclick=\\\"$(this).vote(r.config.vote_hash,
|
56
|
+
null, event)\\\"\\n role=\\\"button\\\"\\n aria-label=\\\"downvote\\\"\\n
|
57
|
+
\ tabindex=\\\"0\\\"\\n >\\n </div>\\n\\n </div>\\n\\n\\n\\n
|
58
|
+
\ <div class=\\\"entry likes\\\">\\n \\n\\n\\n<div class=\\\"collapsed\\\"
|
59
|
+
style='display:none'>\\n \\n\\n\\n \\n <a href=\\\"#\\\" class=\\\"expand\\\"\\n
|
60
|
+
\ onclick=\\\"return showcomment(this)\\\">\\n [+]\\n </a>\\n\\n
|
61
|
+
\ \\n\\n\\n\\n\\n \\n \\n \\n\\n \\n<a \\n href=\\\"http://www.reddit.com/user/<REDDIT_USERNAME>\\\"
|
62
|
+
\ class=\\\"author gray id-t2_c3szt\\\" ><REDDIT_USERNAME></a>\\n\\n\\n
|
63
|
+
\ \\n \\n\\n <span class=\\\"userattrs\\\">\\n </span>\\n\\n\\n\\n
|
64
|
+
\ &#32;\\n\\n \\n \\n <span class=\\\"score dislikes\\\">\\n
|
65
|
+
\ -1 points\\n </span>\\n <span class=\\\"score unvoted\\\">\\n
|
66
|
+
\ 0 points\\n </span>\\n <span class=\\\"score likes\\\">\\n
|
67
|
+
\ 1 point\\n </span>\\n&#32;\\n \\n \\n <time title=\\\"Sun
|
68
|
+
Nov 10 19:54:46 2013 UTC\\\" datetime=\\\"2013-11-10T19:54:46+00:00\\\">\\n
|
69
|
+
\ 45 milliseconds\\n </time>\\n\\n&#32;ago\\n \\n\\n\\n\\n
|
70
|
+
\ &nbsp;<a href=\\\"#\\\" class=\\\"expand\\\"\\n onclick=\\\"return
|
71
|
+
showcomment(this)\\\">\\n (0 \\n children)\\n </a>\\n
|
72
|
+
\ \\n\\n\\n\\n\\n</div>\\n<div class=\\\"noncollapsed\\\" >\\n
|
73
|
+
\ <p class=\\\"tagline\\\">\\n \\n \\n <a href=\\\"#\\\" class=\\\"expand\\\"\\n
|
74
|
+
\ onclick=\\\"return hidecomment(this)\\\">\\n [&ndash;]\\n
|
75
|
+
\ </a>\\n\\n \\n\\n\\n\\n\\n \\n \\n \\n\\n \\n<a \\n
|
76
|
+
\ href=\\\"http://www.reddit.com/user/<REDDIT_USERNAME>\\\" class=\\\"author
|
77
|
+
id-t2_c3szt\\\" ><REDDIT_USERNAME></a>\\n\\n\\n \\n \\n\\n
|
78
|
+
\ <span class=\\\"userattrs\\\">\\n </span>\\n\\n\\n\\n &#32;\\n\\n
|
79
|
+
\ \\n \\n <span class=\\\"score dislikes\\\">\\n -1 points\\n
|
80
|
+
\ </span>\\n <span class=\\\"score unvoted\\\">\\n 0
|
81
|
+
points\\n </span>\\n <span class=\\\"score likes\\\">\\n
|
82
|
+
\ 1 point\\n </span>\\n&#32;\\n \\n \\n <time title=\\\"Sun
|
83
|
+
Nov 10 19:54:46 2013 UTC\\\" datetime=\\\"2013-11-10T19:54:46+00:00\\\">\\n
|
84
|
+
\ 45 milliseconds\\n </time>\\n\\n&#32;ago\\n \\n\\n\\n\\n
|
85
|
+
\ \\n\\n\\n </p>\\n \\n \\n \\n\\n\\n\\n\\n\\n\\n\\n\\n\\n <form
|
86
|
+
action=\\\"#\\\" class=\\\"usertext\\\"\\n onsubmit=\\\"return post_form(this,
|
87
|
+
'editusertext')\\\"\\n \\n id=\\\"form-t1_cdb6jhxr9c\\\">\\n\\n
|
88
|
+
\ <input type=\\\"hidden\\\" name=\\\"thing_id\\\" value=\\\"t1_cdb6jhx\\\"/>\\n\\n
|
89
|
+
\ <div class=\\\"usertext-body\\\">\\n <!-- SC_OFF --><div
|
90
|
+
class=\\\"md\\\"><p>Comment submission test</p>\\n</div><!--
|
91
|
+
SC_ON -->\\n </div>\\n\\n <div class=\\\"usertext-edit\\\"\\n
|
92
|
+
\ style=\\\"display: none\\\">\\n <div>\\n <textarea
|
93
|
+
rows=\\\"1\\\" cols=\\\"1\\\"\\n name=\\\"text\\\"\\n class=\\\"\\\"\\n
|
94
|
+
\ >Comment&#32;submission&#32;test</textarea>\\n
|
95
|
+
\ </div>\\n\\n <div class=\\\"bottom-area\\\">\\n \\n\\n<span
|
96
|
+
class=\\\"help-toggle toggle\\\" style=\\\"display: none\\\" \\n>\\n <a
|
97
|
+
class=\\\"option active \\\" href=\\\"#\\\" tabindex=\\\"100\\\"\\n onclick=\\\"return
|
98
|
+
toggle(this, helpon, helpoff)\\\"\\n >\\n formatting help\\n </a>\\n
|
99
|
+
<a class=\\\"option \\\" href=\\\"#\\\">\\n hide help\\n </a>\\n</span>\\n\\n\\n
|
100
|
+
\ <a href=\\\"/wiki/reddiquette\\\" class=\\\"reddiquette\\\" target=\\\"_blank\\\"
|
101
|
+
tabindex=\\\"100\\\">reddiquette</a>\\n\\n \\n \\n <span
|
102
|
+
class=\\\"error TOO_LONG field-text\\\" \\n style=\\\"display:none\\\">\\n
|
103
|
+
\ </span>\\n\\n \\n \\n <span class=\\\"error RATELIMIT
|
104
|
+
field-ratelimit\\\" \\n style=\\\"display:none\\\">\\n </span>\\n\\n
|
105
|
+
\ \\n \\n <span class=\\\"error NO_TEXT field-text\\\" \\n style=\\\"display:none\\\">\\n
|
106
|
+
\ </span>\\n\\n \\n \\n <span class=\\\"error TOO_OLD
|
107
|
+
field-parent\\\" \\n style=\\\"display:none\\\">\\n </span>\\n\\n
|
108
|
+
\ \\n \\n <span class=\\\"error DELETED_COMMENT field-parent\\\"
|
109
|
+
\\n style=\\\"display:none\\\">\\n </span>\\n\\n \\n \\n
|
110
|
+
\ <span class=\\\"error DELETED_LINK field-parent\\\" \\n style=\\\"display:none\\\">\\n
|
111
|
+
\ </span>\\n\\n \\n \\n <span class=\\\"error USER_BLOCKED
|
112
|
+
field-parent\\\" \\n style=\\\"display:none\\\">\\n </span>\\n\\n
|
113
|
+
\ <div class=\\\"usertext-buttons\\\">\\n \\n <button
|
114
|
+
type=\\\"submit\\\" onclick=\\\"\\\" class=\\\"save\\\"\\n style='display:none'>\\n
|
115
|
+
\ save\\n </button>\\n\\n \\n <button type=\\\"button\\\"
|
116
|
+
onclick=\\\"cancel_usertext(this)\\\" class=\\\"cancel\\\"\\n style='display:none'>\\n
|
117
|
+
\ cancel\\n </button>\\n\\n <span class=\\\"status\\\"></span>\\n
|
118
|
+
\ </div>\\n </div>\\n\\n \\n <div class=\\\"markhelp\\\"
|
119
|
+
style=\\\"display:none\\\">\\n <p>\\n <!-- SC_OFF --><p>reddit
|
120
|
+
uses a slightly-customized version of <a href=\\\"http://daringfireball.net/projects/markdown/syntax\\\">Markdown</a>
|
121
|
+
for formatting. See below for some basics, or check <a href=\\\"/wiki/commenting\\\">the
|
122
|
+
commenting wiki page</a> for more detailed help and solutions to common
|
123
|
+
issues.</p>\\n<!-- SC_ON -->\\n</p>\\n <table class=\\\"md\\\">\\n
|
124
|
+
\ <tr style=\\\"background-color: #ffff99; text-align: center\\\">\\n
|
125
|
+
\ <td><em>you type:</em></td>\\n <td><em>you
|
126
|
+
see:</em></td>\\n </tr>\\n <tr>\\n <td>*italics*</td>\\n
|
127
|
+
\ <td><em>italics</em></td>\\n </tr>\\n
|
128
|
+
\ <tr>\\n <td>**bold**</td>\\n <td><b>bold</b></td>\\n
|
129
|
+
\ </tr>\\n <tr>\\n <td>[reddit!](http://reddit.com)</td>\\n
|
130
|
+
\ <td><a href=\\\"http://reddit.com\\\">reddit!</a></td>\\n
|
131
|
+
\ </tr>\\n <tr>\\n <td>\\n * item
|
132
|
+
1<br/>\\n * item 2<br/>\\n * item 3\\n </td>\\n
|
133
|
+
\ <td>\\n <ul>\\n <li>item 1</li>\\n
|
134
|
+
\ <li>item 2</li>\\n <li>item 3</li>\\n
|
135
|
+
\ </ul>\\n </td>\\n </tr>\\n <tr>\\n
|
136
|
+
\ <td>&gt; quoted text</td>\\n <td><blockquote>quoted
|
137
|
+
text</blockquote></td>\\n </tr>\\n <tr>\\n
|
138
|
+
\ <td>\\n Lines starting with four spaces <br/>\\n
|
139
|
+
\ are treated like code:<br/><br/>\\n <span
|
140
|
+
class=\\\"spaces\\\">\\n &nbsp;&nbsp;&nbsp;&nbsp;\\n
|
141
|
+
\ </span>\\n if 1 * 2 &lt; 3:<br/>\\n
|
142
|
+
\ <span class=\\\"spaces\\\">\\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\\n
|
143
|
+
\ </span>\\n print \\\"hello, world!\\\"<br/>\\n
|
144
|
+
\ </td>\\n <td>Lines starting with four spaces
|
145
|
+
<br/>\\n are treated like code:<br/>\\n <pre>if
|
146
|
+
1 * 2 &lt; 3:<br/>&nbsp;&nbsp;&nbsp;&nbsp;print
|
147
|
+
\\\"hello,\\n world!\\\"</pre>\\n </td>\\n
|
148
|
+
\ </tr>\\n <tr>\\n <td>~~strikethrough~~</td>\\n
|
149
|
+
\ <td><strike>strikethrough</strike></td>\\n
|
150
|
+
\ </tr>\\n <tr>\\n <td>super^script</td>\\n
|
151
|
+
\ <td>super<sup>script</sup></td>\\n </tr>\\n
|
152
|
+
\ </table>\\n </div>\\n\\n </div>\\n\\n </form>\\n\\n\\n\\n
|
153
|
+
\ <ul class=\\\"flat-list buttons\\\">\\n \\n \\n <li class=\\\"first\\\">\\n
|
154
|
+
\ \\n \\n \\n\\n \\n<a \\n href=\\\"http://www.reddit.com/r/RedditKitTesting/comments/1n002d/test_self_post/cdb6jhx\\\"
|
155
|
+
\ class=\\\"bylink\\\" rel=\\\"nofollow\\\" >permalink</a>\\n\\n\\n\\n
|
156
|
+
\ </li>\\n <li class=\\\"comment-save-button\\\">\\n \\n\\n
|
157
|
+
\ \\n \\n\\n <form action=\\\"/post/save\\\" method=\\\"post\\\"
|
158
|
+
\\n class=\\\"state-button save-button\\\">\\n <input
|
159
|
+
type=\\\"hidden\\\" name=\\\"executed\\\" value=\\\"unsave\\\" />\\n <span>\\n
|
160
|
+
\ \\n <a href=\\\"javascript:void(0)\\\"\\n onclick=\\\"toggle_save(this)\\\">save</a>\\n
|
161
|
+
\ \\n </span>\\n </form>\\n\\n </li>\\n <li>\\n
|
162
|
+
\ \\n <a class=\\\"edit-usertext\\\" href=\\\"javascript:void(0)\\\"
|
163
|
+
\\n onclick=\\\"return edit_usertext(this)\\\">edit</a>\\n\\n
|
164
|
+
\ </li>\\n \\n <li>\\n \\n \\n <form class=\\\"toggle
|
165
|
+
del-button \\\" action=\\\"#\\\" method=\\\"get\\\">\\n <input type=\\\"hidden\\\"
|
166
|
+
name=\\\"executed\\\" value=\\\"deleted\\\"/>\\n <span class=\\\"option
|
167
|
+
main active\\\">\\n <a href=\\\"#\\\" class=\\\"togglebutton\\\"
|
168
|
+
onclick=\\\"return toggle(this)\\\">delete</a>\\n </span>\\n
|
169
|
+
\ <span class=\\\"option error\\\">\\n are you sure?\\n &#32;<a
|
170
|
+
href=\\\"javascript:void(0)\\\" class=\\\"yes\\\"\\n onclick='change_state(this,
|
171
|
+
\\\"del\\\", hide_thing, undefined, null)'>\\n yes\\n </a>&#32;/&#32;\\n
|
172
|
+
\ <a href=\\\"javascript:void(0)\\\" class=\\\"no\\\"\\n onclick=\\\"return
|
173
|
+
toggle(this)\\\">no</a>\\n </span>\\n </form>\\n\\n
|
174
|
+
\ </li>\\n <li>\\n \\n \\n <form class=\\\"toggle
|
175
|
+
remove-button \\\" action=\\\"#\\\" method=\\\"get\\\">\\n <input
|
176
|
+
type=\\\"hidden\\\" name=\\\"executed\\\" value=\\\"spammed\\\"/>\\n <span
|
177
|
+
class=\\\"option main active\\\">\\n <a href=\\\"#\\\" class=\\\"togglebutton\\\"
|
178
|
+
onclick=\\\"return toggle(this)\\\">spam</a>\\n </span>\\n
|
179
|
+
\ <span class=\\\"option error\\\">\\n are you sure?\\n &#32;<a
|
180
|
+
href=\\\"javascript:void(0)\\\" class=\\\"yes\\\"\\n onclick='change_state(this,
|
181
|
+
\\\"remove\\\", null, undefined, null)'>\\n yes\\n </a>&#32;/&#32;\\n
|
182
|
+
\ <a href=\\\"javascript:void(0)\\\" class=\\\"no\\\"\\n onclick=\\\"return
|
183
|
+
toggle(this)\\\">no</a>\\n </span>\\n </form>\\n\\n
|
184
|
+
\ </li>\\n <li>\\n \\n \\n <form class=\\\"toggle
|
185
|
+
remove-button \\\" action=\\\"#\\\" method=\\\"get\\\">\\n <input
|
186
|
+
type=\\\"hidden\\\" name=\\\"executed\\\" value=\\\"removed\\\"/>\\n <input
|
187
|
+
type=\\\"hidden\\\" name=\\\"spam\\\" value=\\\"False\\\"/>\\n <span
|
188
|
+
class=\\\"option main active\\\">\\n <a href=\\\"#\\\" class=\\\"togglebutton\\\"
|
189
|
+
onclick=\\\"return toggle(this)\\\">remove</a>\\n </span>\\n
|
190
|
+
\ <span class=\\\"option error\\\">\\n are you sure?\\n &#32;<a
|
191
|
+
href=\\\"javascript:void(0)\\\" class=\\\"yes\\\"\\n onclick='change_state(this,
|
192
|
+
\\\"remove\\\", null, undefined, null)'>\\n yes\\n </a>&#32;/&#32;\\n
|
193
|
+
\ <a href=\\\"javascript:void(0)\\\" class=\\\"no\\\"\\n onclick=\\\"return
|
194
|
+
toggle(this)\\\">no</a>\\n </span>\\n </form>\\n\\n
|
195
|
+
\ </li>\\n\\n\\n \\n <li class=\\\"toggle\\\">\\n <form
|
196
|
+
method=\\\"post\\\" action=\\\"/post/distinguish\\\">\\n <input
|
197
|
+
type=\\\"hidden\\\" value=\\\"distinguishing...\\\" name=\\\"executed\\\"/>\\n
|
198
|
+
\ <a href=\\\"javascript:void(0)\\\"\\n onclick=\\\"return
|
199
|
+
toggle_distinguish_span(this)\\\">distinguish</a>\\n <span
|
200
|
+
class=\\\"option error\\\">\\n distinguish this?\\n\\n &#32;\\n
|
201
|
+
\ \\n <a href=\\\"javascript:void(0)\\\"\\n onclick=\\\"return
|
202
|
+
set_distinguish(this, 'yes')\\\">yes</a>\\n\\n &#32;/\\n
|
203
|
+
\ \\n &#32;\\n \\n <a href=\\\"javascript:void(0)\\\"\\n
|
204
|
+
\ onclick=\\\"return set_distinguish(this, 'no')\\\">no</a>\\n\\n
|
205
|
+
\ &#32;\\n\\n \\n\\n /&#32;\\n <a
|
206
|
+
class=\\\"nonbutton\\\" href=\\\"/wiki/moderation#wiki_distinguishing\\\">\\n
|
207
|
+
\ help\\n </a>\\n &#32;\\n </span>\\n
|
208
|
+
\ </form>\\n </li>\\n\\n <li>\\n \\n <a
|
209
|
+
class=\\\"\\\" href=\\\"javascript:void(0)\\\" \\n onclick=\\\"return reply(this)\\\">reply</a>\\n\\n
|
210
|
+
\ </li>\\n\\n \\n\\n\\n </ul>\\n</div>\\n\\n </div>\\n
|
211
|
+
\ \\n <div class=\\\"child\\\" >\\n \\n </div>\\n\\n <div
|
212
|
+
class=\\\"clearleft\\\"><!--IE6sux--></div>\\n</div>\\n<div
|
213
|
+
class=\\\"clearleft\\\"><!--IE6sux--></div>\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\",
|
214
|
+
\"contentText\": \"Comment submission test\", \"link\": \"t3_1n002d\", \"replies\":
|
215
|
+
\"\", \"contentHTML\": \"<div class=\\\"md\\\"><p>Comment submission
|
216
|
+
test</p>\\n</div>\", \"id\": \"t1_cdb6jhx\"}}]}}}"
|
217
|
+
http_version:
|
218
|
+
recorded_at: Sun, 10 Nov 2013 19:54:45 GMT
|
219
|
+
- request:
|
220
|
+
method: get
|
221
|
+
uri: http://www.reddit.com/api/info.json?id=t1_cdb6jhx
|
222
|
+
body:
|
223
|
+
encoding: US-ASCII
|
224
|
+
string: ''
|
225
|
+
headers:
|
226
|
+
User-Agent:
|
227
|
+
- Faraday v0.8.8
|
228
|
+
Cookie:
|
229
|
+
- reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
|
230
|
+
X-Modhash:
|
231
|
+
- 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
|
232
|
+
Accept-Encoding:
|
233
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
234
|
+
Accept:
|
235
|
+
- "*/*"
|
236
|
+
response:
|
237
|
+
status:
|
238
|
+
code: 200
|
239
|
+
message: OK
|
240
|
+
headers:
|
241
|
+
Content-Type:
|
242
|
+
- application/json; charset=UTF-8
|
243
|
+
Content-Length:
|
244
|
+
- '775'
|
245
|
+
Cache-Control:
|
246
|
+
- no-cache
|
247
|
+
Pragma:
|
248
|
+
- no-cache
|
249
|
+
Server:
|
250
|
+
- "'; DROP TABLE servertypes; --"
|
251
|
+
Date:
|
252
|
+
- Sun, 10 Nov 2013 19:54:46 GMT
|
253
|
+
Connection:
|
254
|
+
- keep-alive
|
255
|
+
body:
|
256
|
+
encoding: UTF-8
|
257
|
+
string: "{\"kind\": \"Listing\", \"data\": {\"modhash\": \"cv8ud7eueg6c046c9c64c945fbcc876efcb4f974e65041d0e8\",
|
258
|
+
\"children\": [{\"kind\": \"t1\", \"data\": {\"subreddit_id\": \"t5_2ylc5\",
|
259
|
+
\"banned_by\": null, \"subreddit\": \"RedditKitTesting\", \"likes\": true,
|
260
|
+
\"replies\": \"\", \"id\": \"cdb6jhx\", \"gilded\": 0, \"author\": \"<REDDIT_USERNAME>\",
|
261
|
+
\"parent_id\": \"t3_1n002d\", \"approved_by\": null, \"body\": \"Comment submission
|
262
|
+
test\", \"edited\": false, \"author_flair_css_class\": null, \"downs\": 0,
|
263
|
+
\"body_html\": \"<div class=\\\"md\\\"><p>Comment submission test</p>\\n</div>\",
|
264
|
+
\"link_id\": \"t3_1n002d\", \"score_hidden\": false, \"name\": \"t1_cdb6jhx\",
|
265
|
+
\"created\": 1384142086.0, \"author_flair_text\": null, \"created_utc\": 1384113286.0,
|
266
|
+
\"ups\": 1, \"num_reports\": 0, \"distinguished\": null}}], \"after\": null,
|
267
|
+
\"before\": null}}"
|
268
|
+
http_version:
|
269
|
+
recorded_at: Sun, 10 Nov 2013 19:54:45 GMT
|
270
|
+
- request:
|
271
|
+
method: post
|
272
|
+
uri: http://www.reddit.com/api/del
|
273
|
+
body:
|
274
|
+
encoding: US-ASCII
|
275
|
+
string: id=t1_cdb6jhx
|
276
|
+
headers:
|
277
|
+
User-Agent:
|
278
|
+
- Faraday v0.8.8
|
279
|
+
Cookie:
|
280
|
+
- reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
|
281
|
+
X-Modhash:
|
282
|
+
- 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
|
283
|
+
Content-Type:
|
284
|
+
- application/x-www-form-urlencoded
|
285
|
+
Accept-Encoding:
|
286
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
287
|
+
Accept:
|
288
|
+
- "*/*"
|
289
|
+
response:
|
290
|
+
status:
|
291
|
+
code: 200
|
292
|
+
message: OK
|
293
|
+
headers:
|
294
|
+
Content-Type:
|
295
|
+
- application/json; charset=UTF-8
|
296
|
+
Content-Length:
|
297
|
+
- '2'
|
298
|
+
Cache-Control:
|
299
|
+
- no-cache
|
300
|
+
Pragma:
|
301
|
+
- no-cache
|
302
|
+
Server:
|
303
|
+
- "'; DROP TABLE servertypes; --"
|
304
|
+
Date:
|
305
|
+
- Sun, 10 Nov 2013 19:54:47 GMT
|
306
|
+
Connection:
|
307
|
+
- keep-alive
|
308
|
+
body:
|
309
|
+
encoding: UTF-8
|
310
|
+
string: "{}"
|
311
|
+
http_version:
|
312
|
+
recorded_at: Sun, 10 Nov 2013 19:54:46 GMT
|
313
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.reddit.com/api/selectflair
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: flair_template_id=12345&r=RedditKitTesting&name&link=t3_1n002d
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Cookie:
|
13
|
+
- reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
|
14
|
+
X-Modhash:
|
15
|
+
- 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
|
16
|
+
Content-Type:
|
17
|
+
- application/x-www-form-urlencoded
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
Accept:
|
21
|
+
- "*/*"
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=UTF-8
|
29
|
+
Content-Length:
|
30
|
+
- '409'
|
31
|
+
Cache-Control:
|
32
|
+
- no-cache
|
33
|
+
Pragma:
|
34
|
+
- no-cache
|
35
|
+
Server:
|
36
|
+
- "'; DROP TABLE servertypes; --"
|
37
|
+
Date:
|
38
|
+
- Sun, 10 Nov 2013 19:56:31 GMT
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: "{\"jquery\": [[0, 1, \"call\", [\"body\"]], [1, 2, \"attr\", \"find\"],
|
44
|
+
[2, 3, \"call\", [\".status\"]], [3, 4, \"attr\", \"hide\"], [4, 5, \"call\",
|
45
|
+
[]], [5, 6, \"attr\", \"html\"], [6, 7, \"call\", [\"\"]], [7, 8, \"attr\",
|
46
|
+
\"end\"], [8, 9, \"call\", []], [0, 10, \"call\", [\".id-t3_1n002d .entry
|
47
|
+
.linkflairlabel\"]], [10, 11, \"attr\", \"remove\"], [11, 12, \"call\", []],
|
48
|
+
[0, 13, \"call\", [\"body\"]], [13, 14, \"attr\", \"click\"], [14, 15, \"call\",
|
49
|
+
[]]]}"
|
50
|
+
http_version:
|
51
|
+
recorded_at: Sun, 10 Nov 2013 19:56:30 GMT
|
52
|
+
recorded_with: VCR 2.6.0
|