redditkit 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,99 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.reddit.com/api/info.json?url=github.com
|
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
|
+
Server:
|
24
|
+
- "'; DROP TABLE servertypes; --"
|
25
|
+
Vary:
|
26
|
+
- accept-encoding
|
27
|
+
Date:
|
28
|
+
- Sun, 10 Nov 2013 19:56:43 GMT
|
29
|
+
Content-Length:
|
30
|
+
- '4582'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: "{\"kind\": \"Listing\", \"data\": {\"modhash\": \"\", \"children\":
|
36
|
+
[{\"kind\": \"t3\", \"data\": {\"domain\": \"github.com\", \"banned_by\":
|
37
|
+
null, \"media_embed\": {}, \"subreddit\": \"rubytesting\", \"selftext_html\":
|
38
|
+
null, \"selftext\": \"\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
39
|
+
null, \"id\": \"110s4j\", \"secure_media_embed\": {}, \"clicked\": false,
|
40
|
+
\"stickied\": false, \"author\": \"rubytesting\", \"media\": null, \"score\":
|
41
|
+
1, \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
|
42
|
+
\"\", \"subreddit_id\": \"t5_2uorf\", \"edited\": false, \"link_flair_css_class\":
|
43
|
+
null, \"author_flair_css_class\": null, \"downs\": 1, \"saved\": false, \"is_self\":
|
44
|
+
false, \"permalink\": \"/r/rubytesting/comments/110s4j/github/\", \"name\":
|
45
|
+
\"t3_110s4j\", \"created\": 1349487983.0, \"url\": \"http://github.com\",
|
46
|
+
\"author_flair_text\": null, \"title\": \"Github\", \"created_utc\": 1349484383.0,
|
47
|
+
\"ups\": 2, \"num_comments\": 0, \"visited\": false, \"num_reports\": null,
|
48
|
+
\"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"github.com\",
|
49
|
+
\"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"anddev\", \"selftext_html\":
|
50
|
+
null, \"selftext\": \"\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
51
|
+
null, \"id\": \"zqfpg\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
52
|
+
false, \"author\": \"brandonlnelson15\", \"media\": null, \"score\": 1, \"approved_by\":
|
53
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
54
|
+
\"t5_2v0vo\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
55
|
+
null, \"downs\": 0, \"saved\": false, \"is_self\": false, \"permalink\": \"/r/anddev/comments/zqfpg/github_\\u8def_social_coding/\",
|
56
|
+
\"name\": \"t3_zqfpg\", \"created\": 1347406958.0, \"url\": \"http://github.com\",
|
57
|
+
\"author_flair_text\": null, \"title\": \"GitHub \\u8def Social Coding\",
|
58
|
+
\"created_utc\": 1347403358.0, \"ups\": 1, \"num_comments\": 0, \"visited\":
|
59
|
+
false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\": \"t3\",
|
60
|
+
\"data\": {\"domain\": \"github.com\", \"banned_by\": null, \"media_embed\":
|
61
|
+
{}, \"subreddit\": \"cocoabeans\", \"selftext_html\": null, \"selftext\":
|
62
|
+
\"\", \"likes\": null, \"secure_media\": null, \"link_flair_text\": null,
|
63
|
+
\"id\": \"t80gs\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
64
|
+
false, \"author\": \"CocoaBeans\", \"media\": null, \"score\": 1, \"approved_by\":
|
65
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
66
|
+
\"t5_2u1f6\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
67
|
+
null, \"downs\": 0, \"saved\": false, \"is_self\": false, \"permalink\": \"/r/cocoabeans/comments/t80gs/test_post_1/\",
|
68
|
+
\"name\": \"t3_t80gs\", \"created\": 1336198967.0, \"url\": \"http://www.github.com\",
|
69
|
+
\"author_flair_text\": null, \"title\": \"Test post 1\", \"created_utc\":
|
70
|
+
1336195367.0, \"ups\": 1, \"num_comments\": 0, \"visited\": false, \"num_reports\":
|
71
|
+
null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
|
72
|
+
\"github.com\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"git\",
|
73
|
+
\"selftext_html\": null, \"selftext\": \"\", \"likes\": null, \"secure_media\":
|
74
|
+
null, \"link_flair_text\": null, \"id\": \"efzk6\", \"secure_media_embed\":
|
75
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"kmwhite\", \"media\":
|
76
|
+
null, \"score\": 3, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
77
|
+
false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qhv1\", \"edited\": false,
|
78
|
+
\"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
79
|
+
2, \"saved\": false, \"is_self\": false, \"permalink\": \"/r/git/comments/efzk6/using_coupon_code_winterwonder_for_a_free_month/\",
|
80
|
+
\"name\": \"t3_efzk6\", \"created\": 1291437148.0, \"url\": \"http://www.github.com\",
|
81
|
+
\"author_flair_text\": null, \"title\": \"Using coupon code winterwonder for
|
82
|
+
a free month of git micro\", \"created_utc\": 1291437148.0, \"ups\": 5, \"num_comments\":
|
83
|
+
0, \"visited\": false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\":
|
84
|
+
\"t3\", \"data\": {\"domain\": \"github.com\", \"banned_by\": null, \"media_embed\":
|
85
|
+
{}, \"subreddit\": \"programming\", \"selftext_html\": null, \"selftext\":
|
86
|
+
\"\", \"likes\": null, \"secure_media\": null, \"link_flair_text\": null,
|
87
|
+
\"id\": \"1jnj1s\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
88
|
+
false, \"author\": \"thai510\", \"media\": null, \"score\": 0, \"approved_by\":
|
89
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
90
|
+
\"t5_2fwo\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
91
|
+
null, \"downs\": 13, \"saved\": false, \"is_self\": false, \"permalink\":
|
92
|
+
\"/r/programming/comments/1jnj1s/github_seems_to_be_down/\", \"name\": \"t3_1jnj1s\",
|
93
|
+
\"created\": 1375578223.0, \"url\": \"http://github.com\", \"author_flair_text\":
|
94
|
+
null, \"title\": \"Github seems to be down\", \"created_utc\": 1375574623.0,
|
95
|
+
\"ups\": 4, \"num_comments\": 3, \"visited\": false, \"num_reports\": null,
|
96
|
+
\"distinguished\": null}}], \"after\": null, \"before\": null}}"
|
97
|
+
http_version:
|
98
|
+
recorded_at: Sun, 10 Nov 2013 19:56:42 GMT
|
99
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.reddit.com/api/marknsfw
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: id=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
|
+
- '2'
|
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:43 GMT
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: "{}"
|
44
|
+
http_version:
|
45
|
+
recorded_at: Sun, 10 Nov 2013 19:56:42 GMT
|
46
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,91 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.reddit.com/random
|
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: 302
|
19
|
+
message: Moved Temporarily
|
20
|
+
headers:
|
21
|
+
Content-Length:
|
22
|
+
- '0'
|
23
|
+
Content-Type:
|
24
|
+
- text/html; charset=UTF-8
|
25
|
+
Location:
|
26
|
+
- http://www.reddit.com/tb/1qbokv
|
27
|
+
Server:
|
28
|
+
- "'; DROP TABLE servertypes; --"
|
29
|
+
Vary:
|
30
|
+
- Accept-Encoding
|
31
|
+
Date:
|
32
|
+
- Sun, 10 Nov 2013 19:56:48 GMT
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-N:
|
36
|
+
- S
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: ''
|
40
|
+
http_version:
|
41
|
+
recorded_at: Sun, 10 Nov 2013 19:56:47 GMT
|
42
|
+
- request:
|
43
|
+
method: get
|
44
|
+
uri: http://www.reddit.com/api/info.json?id=t3_1qbokv
|
45
|
+
body:
|
46
|
+
encoding: US-ASCII
|
47
|
+
string: ''
|
48
|
+
headers:
|
49
|
+
User-Agent:
|
50
|
+
- Faraday v0.8.8
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
Accept:
|
54
|
+
- "*/*"
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 200
|
58
|
+
message: OK
|
59
|
+
headers:
|
60
|
+
Content-Type:
|
61
|
+
- application/json; charset=UTF-8
|
62
|
+
Server:
|
63
|
+
- "'; DROP TABLE servertypes; --"
|
64
|
+
Vary:
|
65
|
+
- accept-encoding
|
66
|
+
Date:
|
67
|
+
- Sun, 10 Nov 2013 19:56:48 GMT
|
68
|
+
Content-Length:
|
69
|
+
- '1132'
|
70
|
+
Connection:
|
71
|
+
- keep-alive
|
72
|
+
body:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: "{\"kind\": \"Listing\", \"data\": {\"modhash\": \"\", \"children\":
|
75
|
+
[{\"kind\": \"t3\", \"data\": {\"domain\": \"self.AskReddit\", \"banned_by\":
|
76
|
+
null, \"media_embed\": {}, \"subreddit\": \"AskReddit\", \"selftext_html\":
|
77
|
+
null, \"selftext\": \"\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
78
|
+
null, \"id\": \"1qbokv\", \"secure_media_embed\": {}, \"clicked\": false,
|
79
|
+
\"stickied\": false, \"author\": \"ilovebacon14\", \"media\": null, \"score\":
|
80
|
+
1, \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
|
81
|
+
\"\", \"subreddit_id\": \"t5_2qh1i\", \"edited\": false, \"link_flair_css_class\":
|
82
|
+
null, \"author_flair_css_class\": null, \"downs\": 0, \"saved\": false, \"is_self\":
|
83
|
+
true, \"permalink\": \"/r/AskReddit/comments/1qbokv/what_is_the_weirdest_comment_or_post_you_have/\",
|
84
|
+
\"name\": \"t3_1qbokv\", \"created\": 1384142165.0, \"url\": \"http://www.reddit.com/r/AskReddit/comments/1qbokv/what_is_the_weirdest_comment_or_post_you_have/\",
|
85
|
+
\"author_flair_text\": null, \"title\": \"What is the weirdest comment or
|
86
|
+
post you have upvoted and why?\", \"created_utc\": 1384113365.0, \"ups\":
|
87
|
+
1, \"num_comments\": 0, \"visited\": false, \"num_reports\": null, \"distinguished\":
|
88
|
+
null}}], \"after\": null, \"before\": null}}"
|
89
|
+
http_version:
|
90
|
+
recorded_at: Sun, 10 Nov 2013 19:56:47 GMT
|
91
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.reddit.com/api/submit
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: title=Test&sr=RedditKitTesting&iden&captcha&text=Test+post
|
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
|
+
- '558'
|
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:46 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\", []], [1, 10, \"attr\", \"captcha\"], [10, 11, \"call\",
|
47
|
+
[\"air5AEw247ykoBhyIRPyYvPAlAjcJXvY\"]], [1, 12, \"attr\", \"find\"], [12,
|
48
|
+
13, \"call\", [\".error.BAD_CAPTCHA.field-captcha\"]], [13, 14, \"attr\",
|
49
|
+
\"show\"], [14, 15, \"call\", []], [15, 16, \"attr\", \"text\"], [16, 17,
|
50
|
+
\"call\", [\"care to try these again?\"]], [17, 18, \"attr\", \"end\"], [18,
|
51
|
+
19, \"call\", []]]}"
|
52
|
+
http_version:
|
53
|
+
recorded_at: Sun, 10 Nov 2013 19:56:45 GMT
|
54
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.reddit.com/api/unhide
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: id=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
|
+
- '2'
|
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:42 GMT
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: "{}"
|
44
|
+
http_version:
|
45
|
+
recorded_at: Sun, 10 Nov 2013 19:56:42 GMT
|
46
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.reddit.com/api/unmarknsfw
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: id=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
|
+
- '2'
|
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:47 GMT
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: "{}"
|
44
|
+
http_version:
|
45
|
+
recorded_at: Sun, 10 Nov 2013 19:56:46 GMT
|
46
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.reddit.com/api/del
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: id=fake-full-name
|
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
|
+
- '2'
|
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:59:01 GMT
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: "{}"
|
44
|
+
http_version:
|
45
|
+
recorded_at: Sun, 10 Nov 2013 19:59:00 GMT
|
46
|
+
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/editusertext
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: text=New+text&thing_id=fake-full-name
|
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
|
+
- '467'
|
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:59:00 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\", []], [1, 10, \"attr\", \"find\"], [10, 11, \"call\",
|
47
|
+
[\".error.NOT_AUTHOR.field-thing_id\"]], [11, 12, \"attr\", \"show\"], [12,
|
48
|
+
13, \"call\", []], [13, 14, \"attr\", \"text\"], [14, 15, \"call\", [\"you
|
49
|
+
can't do that\"]], [15, 16, \"attr\", \"end\"], [16, 17, \"call\", []]]}"
|
50
|
+
http_version:
|
51
|
+
recorded_at: Sun, 10 Nov 2013 19:59:00 GMT
|
52
|
+
recorded_with: VCR 2.6.0
|