redditkit 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +22 -0
  3. data/README.md +155 -0
  4. data/Rakefile +8 -0
  5. data/lib/redditkit.rb +26 -0
  6. data/lib/redditkit/base.rb +60 -0
  7. data/lib/redditkit/client.rb +142 -0
  8. data/lib/redditkit/client/account.rb +73 -0
  9. data/lib/redditkit/client/apps.rb +63 -0
  10. data/lib/redditkit/client/captcha.rb +36 -0
  11. data/lib/redditkit/client/comments.rb +54 -0
  12. data/lib/redditkit/client/flair.rb +148 -0
  13. data/lib/redditkit/client/links.rb +134 -0
  14. data/lib/redditkit/client/miscellaneous.rb +50 -0
  15. data/lib/redditkit/client/moderation.rb +179 -0
  16. data/lib/redditkit/client/multireddits.rb +207 -0
  17. data/lib/redditkit/client/private_messages.rb +74 -0
  18. data/lib/redditkit/client/search.rb +25 -0
  19. data/lib/redditkit/client/subreddits.rb +120 -0
  20. data/lib/redditkit/client/users.rb +109 -0
  21. data/lib/redditkit/client/utilities.rb +137 -0
  22. data/lib/redditkit/client/voting.rb +41 -0
  23. data/lib/redditkit/client/wiki.rb +83 -0
  24. data/lib/redditkit/comment.rb +54 -0
  25. data/lib/redditkit/creatable.rb +17 -0
  26. data/lib/redditkit/error.rb +111 -0
  27. data/lib/redditkit/link.rb +140 -0
  28. data/lib/redditkit/moderator_action.rb +19 -0
  29. data/lib/redditkit/multireddit.rb +32 -0
  30. data/lib/redditkit/multireddit_description.rb +14 -0
  31. data/lib/redditkit/paginated_response.rb +22 -0
  32. data/lib/redditkit/private_message.rb +27 -0
  33. data/lib/redditkit/response/parse_json.rb +29 -0
  34. data/lib/redditkit/response/raise_error.rb +21 -0
  35. data/lib/redditkit/subreddit.rb +86 -0
  36. data/lib/redditkit/thing.rb +20 -0
  37. data/lib/redditkit/user.rb +30 -0
  38. data/lib/redditkit/version.rb +19 -0
  39. data/lib/redditkit/votable.rb +37 -0
  40. data/redditkit.gemspec +25 -0
  41. data/spec/cassettes/RedditKit_Client/should_raise_an_error_with_invalid_credentials.yml +39 -0
  42. data/spec/cassettes/RedditKit_Client_Account/_sign_in/signs_the_user_in.yml +132 -0
  43. data/spec/cassettes/RedditKit_Client_Account/_update_session/updates_the_current_session.yml +133 -0
  44. data/spec/cassettes/RedditKit_Client_Captcha/_captcha_url/returns_a_CAPTCHA_url_from_an_identifier.yml +38 -0
  45. data/spec/cassettes/RedditKit_Client_Captcha/_needs_captcha_/checks_if_the_current_account_needs_a_CAPTCHA.yml +44 -0
  46. data/spec/cassettes/RedditKit_Client_Captcha/_new_captcha_identifier/returns_a_new_CAPTCHA_identifier.yml +38 -0
  47. data/spec/cassettes/RedditKit_Client_Comments/_comment/requests_the_correct_resource.yml +47 -0
  48. data/spec/cassettes/RedditKit_Client_Comments/_comments/with_a_RedditKit_Link/returns_comments_on_a_link.yml +140 -0
  49. data/spec/cassettes/RedditKit_Client_Comments/_comments/with_a_link_identifier/returns_comments_on_a_link.yml +89 -0
  50. data/spec/cassettes/RedditKit_Client_Comments/_submit_comment/requests_the_correct_resource.yml +313 -0
  51. data/spec/cassettes/RedditKit_Client_Flair/_apply_flair_template/clears_flair_templates.yml +52 -0
  52. data/spec/cassettes/RedditKit_Client_Flair/_clear_flair_templates/clears_flair_templates.yml +49 -0
  53. data/spec/cassettes/RedditKit_Client_Flair/_create_flair_template/creates_a_flair_template.yml +46 -0
  54. data/spec/cassettes/RedditKit_Client_Flair/_create_flair_template/raises_InvalidClassName.yml +46 -0
  55. data/spec/cassettes/RedditKit_Client_Flair/_create_flair_template/raises_TooManyClassNames.yml +47 -0
  56. data/spec/cassettes/RedditKit_Client_Flair/_delete_user_flair/requests_the_correct_resource.yml +60 -0
  57. data/spec/cassettes/RedditKit_Client_Flair/_flair_list/returns_the_list_of_flair.yml +44 -0
  58. data/spec/cassettes/RedditKit_Client_Flair/_set_flair/requests_the_correct_resource.yml +49 -0
  59. data/spec/cassettes/RedditKit_Client_Flair/_set_flair_options/sets_flair_options.yml +49 -0
  60. data/spec/cassettes/RedditKit_Client_Flair/_set_flair_with_csv/requests_the_correct_resource.yml +51 -0
  61. data/spec/cassettes/RedditKit_Client_Flair/_toggle_flair/requests_the_correct_resource.yml +49 -0
  62. data/spec/cassettes/RedditKit_Client_Links/_front_page/requests_the_correct_category.yml +498 -0
  63. data/spec/cassettes/RedditKit_Client_Links/_front_page/requests_the_correct_resource.yml +603 -0
  64. data/spec/cassettes/RedditKit_Client_Links/_hide/requests_the_correct_resource.yml +46 -0
  65. data/spec/cassettes/RedditKit_Client_Links/_link/returns_a_link.yml +55 -0
  66. data/spec/cassettes/RedditKit_Client_Links/_links/contains_pagination_information.yml +402 -0
  67. data/spec/cassettes/RedditKit_Client_Links/_links/requests_a_certain_number_of_links.yml +186 -0
  68. data/spec/cassettes/RedditKit_Client_Links/_links/requests_front_page_links_if_no_subreddit_is_present.yml +603 -0
  69. data/spec/cassettes/RedditKit_Client_Links/_links/requests_links_with_the_correct_time_frame.yml +375 -0
  70. data/spec/cassettes/RedditKit_Client_Links/_links/requests_the_correct_subreddit_and_category.yml +402 -0
  71. data/spec/cassettes/RedditKit_Client_Links/_links_with_domain/returns_links_with_a_specific_domain.yml +99 -0
  72. data/spec/cassettes/RedditKit_Client_Links/_mark_nsfw/requests_the_correct_resource.yml +46 -0
  73. data/spec/cassettes/RedditKit_Client_Links/_random_link/returns_a_random_link.yml +91 -0
  74. data/spec/cassettes/RedditKit_Client_Links/_submit/raises_RedditKit_InvalidCaptcha_if_no_CAPTCHA_is_filled_out.yml +54 -0
  75. data/spec/cassettes/RedditKit_Client_Links/_unhide/requests_the_correct_resource.yml +46 -0
  76. data/spec/cassettes/RedditKit_Client_Links/_unmark_nsfw/requests_the_correct_resource.yml +46 -0
  77. data/spec/cassettes/RedditKit_Client_Miscellaneous/_delete/requests_the_correct_resource.yml +46 -0
  78. data/spec/cassettes/RedditKit_Client_Miscellaneous/_edit/requests_the_correct_resource.yml +52 -0
  79. data/spec/cassettes/RedditKit_Client_Miscellaneous/_save/saves_an_object.yml +46 -0
  80. data/spec/cassettes/RedditKit_Client_Miscellaneous/_unsave/unsaves_an_object.yml +89 -0
  81. data/spec/cassettes/RedditKit_Client_Moderation/_accept_moderator_invitation/requests_the_correct_resource.yml +53 -0
  82. data/spec/cassettes/RedditKit_Client_Moderation/_ban/requests_the_correct_resource.yml +103 -0
  83. data/spec/cassettes/RedditKit_Client_Moderation/_contributors_to_subreddit/requests_the_correct_resource.yml +47 -0
  84. data/spec/cassettes/RedditKit_Client_Moderation/_ignore_reports/requests_the_correct_resource.yml +46 -0
  85. data/spec/cassettes/RedditKit_Client_Moderation/_moderation_log/returns_RedditKit_ModeratorAction_objects.yml +153 -0
  86. data/spec/cassettes/RedditKit_Client_Moderation/_moderators_of_subreddit/requests_the_correct_resource.yml +48 -0
  87. data/spec/cassettes/RedditKit_Client_Moderation/_reset_subreddit_header/requests_the_correct_resource.yml +55 -0
  88. data/spec/cassettes/RedditKit_Client_Moderation/_set_contest_mode/requests_the_correct_resource.yml +46 -0
  89. data/spec/cassettes/RedditKit_Client_Moderation/_set_sticky_post/requests_the_correct_resource.yml +46 -0
  90. data/spec/cassettes/RedditKit_Client_Moderation/_unban/requests_the_correct_resource.yml +54 -0
  91. data/spec/cassettes/RedditKit_Client_Moderation/_unignore_reports/requests_the_correct_resource.yml +46 -0
  92. data/spec/cassettes/RedditKit_Client_Multireddits/_add_subreddit_to_multireddit/adds_a_subreddit_to_a_multireddit.yml +177 -0
  93. data/spec/cassettes/RedditKit_Client_Multireddits/_create_multireddit/creates_a_multireddit.yml +137 -0
  94. data/spec/cassettes/RedditKit_Client_Multireddits/_create_multireddit/raises_RedditKit_Conflict_when_using_an_existing_name.yml +133 -0
  95. data/spec/cassettes/RedditKit_Client_Multireddits/_delete_multireddit/deletes_a_multireddit.yml +134 -0
  96. data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit/with_a_path/returns_a_multireddit.yml +39 -0
  97. data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit/without_a_path/returns_a_multireddit.yml +39 -0
  98. data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_multireddit/returns_a_multireddit_description.yml +81 -0
  99. data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_username_and_multireddit_name/returns_a_multireddit_description.yml +45 -0
  100. data/spec/cassettes/RedditKit_Client_Multireddits/_my_multireddits/return_s_the_user_s_multireddits.yml +47 -0
  101. data/spec/cassettes/RedditKit_Client_Multireddits/_remove_subreddit_from_multireddit/removes_a_subreddit_from_a_multireddit.yml +175 -0
  102. data/spec/cassettes/RedditKit_Client_Multireddits/_rename_multireddit/renames_a_multireddit.yml +134 -0
  103. data/spec/cassettes/RedditKit_Client_Multireddits/_set_multireddit_description/returns_a_multireddit_description.yml +48 -0
  104. data/spec/cassettes/RedditKit_Client_Multireddits/_update_multireddit/updates_a_multireddit.yml +184 -0
  105. data/spec/cassettes/RedditKit_Client_PrivateMessages/_block_author_of_message/requests_the_correct_resource.yml +46 -0
  106. data/spec/cassettes/RedditKit_Client_PrivateMessages/_mark_as_read/requests_the_correct_resource.yml +51 -0
  107. data/spec/cassettes/RedditKit_Client_PrivateMessages/_mark_as_unread/requests_the_correct_resource.yml +51 -0
  108. data/spec/cassettes/RedditKit_Client_PrivateMessages/_messages/requests_the_correct_resource.yml +187 -0
  109. data/spec/cassettes/RedditKit_Client_PrivateMessages/_unblock/requests_the_correct_resource.yml +46 -0
  110. data/spec/cassettes/RedditKit_Client_Search/_search/restricts_searches_to_a_specific_subreddit.yml +878 -0
  111. data/spec/cassettes/RedditKit_Client_Search/_search/returns_a_specific_number_of_results.yml +130 -0
  112. data/spec/cassettes/RedditKit_Client_Search/_search/returns_search_results.yml +844 -0
  113. data/spec/cassettes/RedditKit_Client_Subreddits/_random_subreddit/returns_a_random_subreddit.yml +181 -0
  114. data/spec/cassettes/RedditKit_Client_Subreddits/_recommended_subreddits/returns_subreddit_names.yml +37 -0
  115. data/spec/cassettes/RedditKit_Client_Subreddits/_search_subreddits_by_name/returns_subreddit_names.yml +875 -0
  116. data/spec/cassettes/RedditKit_Client_Subreddits/_subreddit/returns_a_specified_subreddit.yml +100 -0
  117. data/spec/cassettes/RedditKit_Client_Subreddits/_subreddits/returns_a_specified_number_of_subreddits.yml +505 -0
  118. data/spec/cassettes/RedditKit_Client_Subreddits/_subreddits/returns_subreddits_from_a_specific_category.yml +510 -0
  119. data/spec/cassettes/RedditKit_Client_Subreddits/_subreddits_by_topic/returns_subreddit_names.yml +41 -0
  120. data/spec/cassettes/RedditKit_Client_Subreddits/_subscribe/requests_the_correct_resource.yml +46 -0
  121. data/spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_a_specified_number_of_subreddits.yml +415 -0
  122. data/spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_subreddits_from_a_specific_category.yml +58 -0
  123. data/spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_the_user_s_subscribed_subreddits.yml +3469 -0
  124. data/spec/cassettes/RedditKit_Client_Subreddits/_unsubscribe/requests_the_correct_resource.yml +46 -0
  125. data/spec/cassettes/RedditKit_Client_Users/_friends/returns_the_user_s_friends.yml +48 -0
  126. data/spec/cassettes/RedditKit_Client_Users/_my_content/returns_the_user_s_content.yml +60 -0
  127. data/spec/cassettes/RedditKit_Client_Users/_user/requests_the_correct_resource.yml +48 -0
  128. data/spec/cassettes/RedditKit_Client_Users/_user/returns_a_specified_user.yml +48 -0
  129. data/spec/cassettes/RedditKit_Client_Users/_user/returns_the_authenticated_user.yml +48 -0
  130. data/spec/cassettes/RedditKit_Client_Users/_user_content/returns_the_user_s_content.yml +41 -0
  131. data/spec/cassettes/RedditKit_Client_Users/_username_available_/returns_false_for_an_unavailable_username.yml +36 -0
  132. data/spec/cassettes/RedditKit_Client_Users/_username_available_/returns_true_for_an_available_username.yml +36 -0
  133. data/spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_comment_full_name_passed/downvotes_the_comment.yml +100 -0
  134. data/spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_comment_passed/downvotes_the_comment.yml +154 -0
  135. data/spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_link_full_name_passed/downvotes_the_link.yml +106 -0
  136. data/spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_link_passed/downvotes_the_link.yml +166 -0
  137. data/spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_comment_full_name_passed/upvotes_the_comment.yml +100 -0
  138. data/spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_comment_passed/upvotes_the_comment.yml +154 -0
  139. data/spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_link_full_name_passed/upvotes_the_link.yml +106 -0
  140. data/spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_link_passed/upvotes_the_link.yml +166 -0
  141. data/spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_comment_full_name_passed/withdraws_the_vote_on_the_comment.yml +154 -0
  142. data/spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_comment_passed/withdraws_the_vote_on_the_comment.yml +208 -0
  143. data/spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_link_full_name_passed/withdraws_the_vote_on_the_link.yml +166 -0
  144. data/spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_link_passed/withdraws_the_vote_on_the_link.yml +226 -0
  145. data/spec/cassettes/RedditKit_Client_Wiki/_add_wiki_editor/requests_the_correct_resource.yml +46 -0
  146. data/spec/cassettes/RedditKit_Client_Wiki/_edit_wiki_page/requests_the_correct_resource.yml +48 -0
  147. data/spec/cassettes/RedditKit_Client_Wiki/_hide_wiki_revision/requests_the_correct_resource.yml +46 -0
  148. data/spec/cassettes/RedditKit_Client_Wiki/_remove_wiki_editor/requests_the_correct_resource.yml +46 -0
  149. data/spec/cassettes/RedditKit_Client_Wiki/_revert_to_revision/requests_the_correct_resource.yml +46 -0
  150. data/spec/cassettes/RedditKit_Comment/should_not_be_deleted_if_neither_author_and_comment_attributes_are_set_to_deleted_.yml +90 -0
  151. data/spec/cassettes/RedditKit_Comment/should_return_replies.yml +90 -0
  152. data/spec/cassettes/authenticated_client.yml +87 -0
  153. data/spec/redditkit/base_spec.rb +45 -0
  154. data/spec/redditkit/client/account_spec.rb +50 -0
  155. data/spec/redditkit/client/apps_spec.rb +58 -0
  156. data/spec/redditkit/client/captcha_spec.rb +30 -0
  157. data/spec/redditkit/client/comments_spec.rb +40 -0
  158. data/spec/redditkit/client/flair_spec.rb +92 -0
  159. data/spec/redditkit/client/links_spec.rb +103 -0
  160. data/spec/redditkit/client/miscellaneous_spec.rb +40 -0
  161. data/spec/redditkit/client/moderation_spec.rb +141 -0
  162. data/spec/redditkit/client/multireddits_spec.rb +158 -0
  163. data/spec/redditkit/client/private_messages_spec.rb +51 -0
  164. data/spec/redditkit/client/search_spec.rb +25 -0
  165. data/spec/redditkit/client/subreddits_spec.rb +83 -0
  166. data/spec/redditkit/client/users_spec.rb +92 -0
  167. data/spec/redditkit/client/voting_spec.rb +99 -0
  168. data/spec/redditkit/client/wiki_spec.rb +40 -0
  169. data/spec/redditkit/client_spec.rb +46 -0
  170. data/spec/redditkit/comment_spec.rb +26 -0
  171. data/spec/redditkit/creatable_spec.rb +24 -0
  172. data/spec/redditkit/error_spec.rb +61 -0
  173. data/spec/redditkit/link_spec.rb +33 -0
  174. data/spec/redditkit/multireddit_spec.rb +27 -0
  175. data/spec/redditkit/paginated_response_spec.rb +23 -0
  176. data/spec/redditkit/thing_spec.rb +18 -0
  177. data/spec/redditkit/votable_spec.rb +52 -0
  178. data/spec/redditkit_spec.rb +21 -0
  179. data/spec/spec_helper.rb +124 -0
  180. metadata +390 -0
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ describe RedditKit::PaginatedResponse do
4
+
5
+ before :all do
6
+ @response = RedditKit::PaginatedResponse.new('12345', '54321', %w(one two three))
7
+ end
8
+
9
+ it "contains pagination information" do
10
+ expect(@response.before).to eq '12345'
11
+ expect(@response.after).to eq '54321'
12
+ end
13
+
14
+ it "contains results" do
15
+ expect(@response.results.length).to eq 3
16
+ end
17
+
18
+ it "forwards array methods" do
19
+ expect(@response.first).to eq 'one'
20
+ expect(@response.length).to eq 3
21
+ end
22
+
23
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe RedditKit::Thing do
4
+
5
+ before :all do
6
+ @thing = RedditKit::Thing.new({ :kind => 't1', :data => { :id => '12345' } })
7
+ end
8
+
9
+ it "returns the thing's full name" do
10
+ expect(@thing.full_name).to eq 't1_12345'
11
+ end
12
+
13
+ it "is equal to another thing with the same full name" do
14
+ second_thing = RedditKit::Thing.new({ :kind => 't1', :data => { :id => '12345' } })
15
+ expect(@thing == second_thing).to be_true
16
+ end
17
+
18
+ end
@@ -0,0 +1,52 @@
1
+ require 'spec_helper'
2
+
3
+ describe RedditKit::Votable do
4
+
5
+ class VotableClass
6
+ def initialize
7
+ @attributes = { :ups => 10, :downs => 5, :score => 5, :likes => true }
8
+ end
9
+ end
10
+
11
+ before :all do
12
+ @votable = VotableClass.new
13
+ @votable.extend RedditKit::Votable
14
+ end
15
+
16
+ describe "#upvotes" do
17
+ it "returns the number of upvotes" do
18
+ expect(@votable.upvotes).to eq 10
19
+ end
20
+ end
21
+
22
+ describe "#downvotes" do
23
+ it "returns the number of downvotes" do
24
+ expect(@votable.downvotes).to eq 5
25
+ end
26
+ end
27
+
28
+ describe "#score" do
29
+ it "returns the score" do
30
+ expect(@votable.score).to eq 5
31
+ end
32
+ end
33
+
34
+ describe "#upvoted?" do
35
+ it "determines whether the object is upvoted" do
36
+ expect(@votable.upvoted?).to be_true
37
+ end
38
+ end
39
+
40
+ describe "#downvoted?" do
41
+ it "determines whether the object is downvoted" do
42
+ expect(@votable.downvoted?).to_not be_true
43
+ end
44
+ end
45
+
46
+ describe "#voted?" do
47
+ it "determines whether the object has been voted on" do
48
+ expect(@votable.voted?).to be_true
49
+ end
50
+ end
51
+
52
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ describe RedditKit do
4
+
5
+ it "returns a RedditKit::Client" do
6
+ expect(RedditKit.client).to be_kind_of RedditKit::Client
7
+ end
8
+
9
+ it "caches the RedditKit::Client" do
10
+ expect(RedditKit.client).to eq RedditKit.client
11
+ end
12
+
13
+ it "responds to methods on its client" do
14
+ expect(RedditKit.respond_to?(:username)).to be_true
15
+ end
16
+
17
+ it "forwards methods to its client" do
18
+ expect { RedditKit.username }.not_to raise_error
19
+ end
20
+
21
+ end
@@ -0,0 +1,124 @@
1
+ require 'simplecov'
2
+ require 'coveralls'
3
+
4
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
5
+ SimpleCov.start
6
+
7
+ require 'dotenv'
8
+ Dotenv.load
9
+
10
+ require 'redditkit'
11
+ require 'rspec'
12
+ require 'webmock/rspec'
13
+ require 'vcr'
14
+
15
+ RSpec.configure do |c|
16
+ c.treat_symbols_as_metadata_keys_with_true_values = true
17
+ end
18
+
19
+ VCR.configure do |c|
20
+ c.configure_rspec_metadata!
21
+
22
+ c.filter_sensitive_data("<REDDIT_USERNAME>") do
23
+ ENV['REDDITKIT_TEST_USERNAME']
24
+ end
25
+
26
+ c.filter_sensitive_data("<REDDIT_PASSWORD>") do
27
+ ENV['REDDITKIT_TEST_PASSWORD']
28
+ end
29
+
30
+ c.cassette_library_dir = 'spec/cassettes'
31
+ c.hook_into :webmock
32
+ c.default_cassette_options = { :record => :new_episodes }
33
+ end
34
+
35
+ # The username for the reddit account to use during testing.
36
+ #
37
+ # @return The account's username.
38
+ def redditkit_username
39
+ ENV.fetch 'REDDITKIT_TEST_USERNAME'
40
+ end
41
+
42
+ # The password for the reddit account to use during testing.
43
+ #
44
+ # @return The account's password.
45
+ def redditkit_password
46
+ ENV.fetch 'REDDITKIT_TEST_PASSWORD'
47
+ end
48
+
49
+ # Returns the name of a subreddit for which the test user has moderator privileges.
50
+ # Don't use an active subreddit for this, but instead one set up purely for testing.
51
+ #
52
+ # @return The subreddit's name.
53
+ def redditkit_subreddit
54
+ ENV.fetch 'REDDITKIT_TEST_SUBREDDIT'
55
+ end
56
+
57
+ # Returns a full name of a link which is publicly accessible and will never be deleted.
58
+ # This can be used for voting, saving, hiding, etc.
59
+ #
60
+ # @return The test link's full name.
61
+ def test_link_full_name
62
+ 't3_1n002d'
63
+ end
64
+
65
+ # Returns a link which is publicly accessible and will never be deleted.
66
+ # This can be used for voting, saving, hiding, etc.
67
+ #
68
+ # @return The test link.
69
+ def test_link
70
+ authenticated_client.link test_link_full_name
71
+ end
72
+
73
+ # Returns a comment which is publicly accessible and will never be deleted.
74
+ # This can be used for voting, hiding, etc.
75
+ #
76
+ # @return The test comment's full name.
77
+ def test_comment_full_name
78
+ 't1_cce66qf'
79
+ end
80
+
81
+ # Returns a comment which is publicly accessible and will never be deleted.
82
+ # This can be used for voting, hiding, etc.
83
+ #
84
+ # @return The test comment.
85
+ def test_comment
86
+ authenticated_client.comment test_comment_full_name
87
+ end
88
+
89
+ # An RKClient object which has been authenticated with reddit.
90
+ #
91
+ # @return The authenticated client.
92
+ def authenticated_client
93
+ VCR.use_cassette('authenticated_client') do
94
+ RedditKit::Client.new redditkit_username, redditkit_password
95
+ end
96
+ end
97
+
98
+ def reddit_url(path)
99
+ "#{RedditKit.api_endpoint}#{path}"
100
+ end
101
+
102
+ def subreddit_url(subreddit_name, path)
103
+ "#{RedditKit.api_endpoint}r/#{subreddit_name}/#{path}"
104
+ end
105
+
106
+ def stub_empty_post_request(path)
107
+ stub_request(:post, RedditKit.api_endpoint + path).to_return(:body => "", :headers => {:content_type => "application/json; charset=utf-8"})
108
+ end
109
+
110
+ def a_delete(path)
111
+ a_request(:delete, RedditKit.api_endpoint + path)
112
+ end
113
+
114
+ def a_get(path)
115
+ a_request(:get, RedditKit.api_endpoint + path)
116
+ end
117
+
118
+ def a_post(path)
119
+ a_request(:post, RedditKit.api_endpoint + path)
120
+ end
121
+
122
+ def a_put(path)
123
+ a_request(:put, RedditKit.api_endpoint + path)
124
+ end
metadata ADDED
@@ -0,0 +1,390 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: redditkit
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Sam Symons
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.8'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: dotenv
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: A simple reddit API library, covering 100% of the reddit API.
42
+ email:
43
+ - samsymons@me.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - LICENSE.md
49
+ - README.md
50
+ - Rakefile
51
+ - redditkit.gemspec
52
+ - lib/redditkit/base.rb
53
+ - lib/redditkit/client/account.rb
54
+ - lib/redditkit/client/apps.rb
55
+ - lib/redditkit/client/captcha.rb
56
+ - lib/redditkit/client/comments.rb
57
+ - lib/redditkit/client/flair.rb
58
+ - lib/redditkit/client/links.rb
59
+ - lib/redditkit/client/miscellaneous.rb
60
+ - lib/redditkit/client/moderation.rb
61
+ - lib/redditkit/client/multireddits.rb
62
+ - lib/redditkit/client/private_messages.rb
63
+ - lib/redditkit/client/search.rb
64
+ - lib/redditkit/client/subreddits.rb
65
+ - lib/redditkit/client/users.rb
66
+ - lib/redditkit/client/utilities.rb
67
+ - lib/redditkit/client/voting.rb
68
+ - lib/redditkit/client/wiki.rb
69
+ - lib/redditkit/client.rb
70
+ - lib/redditkit/comment.rb
71
+ - lib/redditkit/creatable.rb
72
+ - lib/redditkit/error.rb
73
+ - lib/redditkit/link.rb
74
+ - lib/redditkit/moderator_action.rb
75
+ - lib/redditkit/multireddit.rb
76
+ - lib/redditkit/multireddit_description.rb
77
+ - lib/redditkit/paginated_response.rb
78
+ - lib/redditkit/private_message.rb
79
+ - lib/redditkit/response/parse_json.rb
80
+ - lib/redditkit/response/raise_error.rb
81
+ - lib/redditkit/subreddit.rb
82
+ - lib/redditkit/thing.rb
83
+ - lib/redditkit/user.rb
84
+ - lib/redditkit/version.rb
85
+ - lib/redditkit/votable.rb
86
+ - lib/redditkit.rb
87
+ - spec/cassettes/authenticated_client.yml
88
+ - spec/cassettes/RedditKit_Client/should_raise_an_error_with_invalid_credentials.yml
89
+ - spec/cassettes/RedditKit_Client_Account/_sign_in/signs_the_user_in.yml
90
+ - spec/cassettes/RedditKit_Client_Account/_update_session/updates_the_current_session.yml
91
+ - spec/cassettes/RedditKit_Client_Captcha/_captcha_url/returns_a_CAPTCHA_url_from_an_identifier.yml
92
+ - spec/cassettes/RedditKit_Client_Captcha/_needs_captcha_/checks_if_the_current_account_needs_a_CAPTCHA.yml
93
+ - spec/cassettes/RedditKit_Client_Captcha/_new_captcha_identifier/returns_a_new_CAPTCHA_identifier.yml
94
+ - spec/cassettes/RedditKit_Client_Comments/_comment/requests_the_correct_resource.yml
95
+ - spec/cassettes/RedditKit_Client_Comments/_comments/with_a_link_identifier/returns_comments_on_a_link.yml
96
+ - spec/cassettes/RedditKit_Client_Comments/_comments/with_a_RedditKit_Link/returns_comments_on_a_link.yml
97
+ - spec/cassettes/RedditKit_Client_Comments/_submit_comment/requests_the_correct_resource.yml
98
+ - spec/cassettes/RedditKit_Client_Flair/_apply_flair_template/clears_flair_templates.yml
99
+ - spec/cassettes/RedditKit_Client_Flair/_clear_flair_templates/clears_flair_templates.yml
100
+ - spec/cassettes/RedditKit_Client_Flair/_create_flair_template/creates_a_flair_template.yml
101
+ - spec/cassettes/RedditKit_Client_Flair/_create_flair_template/raises_InvalidClassName.yml
102
+ - spec/cassettes/RedditKit_Client_Flair/_create_flair_template/raises_TooManyClassNames.yml
103
+ - spec/cassettes/RedditKit_Client_Flair/_delete_user_flair/requests_the_correct_resource.yml
104
+ - spec/cassettes/RedditKit_Client_Flair/_flair_list/returns_the_list_of_flair.yml
105
+ - spec/cassettes/RedditKit_Client_Flair/_set_flair/requests_the_correct_resource.yml
106
+ - spec/cassettes/RedditKit_Client_Flair/_set_flair_options/sets_flair_options.yml
107
+ - spec/cassettes/RedditKit_Client_Flair/_set_flair_with_csv/requests_the_correct_resource.yml
108
+ - spec/cassettes/RedditKit_Client_Flair/_toggle_flair/requests_the_correct_resource.yml
109
+ - spec/cassettes/RedditKit_Client_Links/_front_page/requests_the_correct_category.yml
110
+ - spec/cassettes/RedditKit_Client_Links/_front_page/requests_the_correct_resource.yml
111
+ - spec/cassettes/RedditKit_Client_Links/_hide/requests_the_correct_resource.yml
112
+ - spec/cassettes/RedditKit_Client_Links/_link/returns_a_link.yml
113
+ - spec/cassettes/RedditKit_Client_Links/_links/contains_pagination_information.yml
114
+ - spec/cassettes/RedditKit_Client_Links/_links/requests_a_certain_number_of_links.yml
115
+ - spec/cassettes/RedditKit_Client_Links/_links/requests_front_page_links_if_no_subreddit_is_present.yml
116
+ - spec/cassettes/RedditKit_Client_Links/_links/requests_links_with_the_correct_time_frame.yml
117
+ - spec/cassettes/RedditKit_Client_Links/_links/requests_the_correct_subreddit_and_category.yml
118
+ - spec/cassettes/RedditKit_Client_Links/_links_with_domain/returns_links_with_a_specific_domain.yml
119
+ - spec/cassettes/RedditKit_Client_Links/_mark_nsfw/requests_the_correct_resource.yml
120
+ - spec/cassettes/RedditKit_Client_Links/_random_link/returns_a_random_link.yml
121
+ - spec/cassettes/RedditKit_Client_Links/_submit/raises_RedditKit_InvalidCaptcha_if_no_CAPTCHA_is_filled_out.yml
122
+ - spec/cassettes/RedditKit_Client_Links/_unhide/requests_the_correct_resource.yml
123
+ - spec/cassettes/RedditKit_Client_Links/_unmark_nsfw/requests_the_correct_resource.yml
124
+ - spec/cassettes/RedditKit_Client_Miscellaneous/_delete/requests_the_correct_resource.yml
125
+ - spec/cassettes/RedditKit_Client_Miscellaneous/_edit/requests_the_correct_resource.yml
126
+ - spec/cassettes/RedditKit_Client_Miscellaneous/_save/saves_an_object.yml
127
+ - spec/cassettes/RedditKit_Client_Miscellaneous/_unsave/unsaves_an_object.yml
128
+ - spec/cassettes/RedditKit_Client_Moderation/_accept_moderator_invitation/requests_the_correct_resource.yml
129
+ - spec/cassettes/RedditKit_Client_Moderation/_ban/requests_the_correct_resource.yml
130
+ - spec/cassettes/RedditKit_Client_Moderation/_contributors_to_subreddit/requests_the_correct_resource.yml
131
+ - spec/cassettes/RedditKit_Client_Moderation/_ignore_reports/requests_the_correct_resource.yml
132
+ - spec/cassettes/RedditKit_Client_Moderation/_moderation_log/returns_RedditKit_ModeratorAction_objects.yml
133
+ - spec/cassettes/RedditKit_Client_Moderation/_moderators_of_subreddit/requests_the_correct_resource.yml
134
+ - spec/cassettes/RedditKit_Client_Moderation/_reset_subreddit_header/requests_the_correct_resource.yml
135
+ - spec/cassettes/RedditKit_Client_Moderation/_set_contest_mode/requests_the_correct_resource.yml
136
+ - spec/cassettes/RedditKit_Client_Moderation/_set_sticky_post/requests_the_correct_resource.yml
137
+ - spec/cassettes/RedditKit_Client_Moderation/_unban/requests_the_correct_resource.yml
138
+ - spec/cassettes/RedditKit_Client_Moderation/_unignore_reports/requests_the_correct_resource.yml
139
+ - spec/cassettes/RedditKit_Client_Multireddits/_add_subreddit_to_multireddit/adds_a_subreddit_to_a_multireddit.yml
140
+ - spec/cassettes/RedditKit_Client_Multireddits/_create_multireddit/creates_a_multireddit.yml
141
+ - spec/cassettes/RedditKit_Client_Multireddits/_create_multireddit/raises_RedditKit_Conflict_when_using_an_existing_name.yml
142
+ - spec/cassettes/RedditKit_Client_Multireddits/_delete_multireddit/deletes_a_multireddit.yml
143
+ - spec/cassettes/RedditKit_Client_Multireddits/_multireddit/with_a_path/returns_a_multireddit.yml
144
+ - spec/cassettes/RedditKit_Client_Multireddits/_multireddit/without_a_path/returns_a_multireddit.yml
145
+ - spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_multireddit/returns_a_multireddit_description.yml
146
+ - spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_username_and_multireddit_name/returns_a_multireddit_description.yml
147
+ - spec/cassettes/RedditKit_Client_Multireddits/_my_multireddits/return_s_the_user_s_multireddits.yml
148
+ - spec/cassettes/RedditKit_Client_Multireddits/_remove_subreddit_from_multireddit/removes_a_subreddit_from_a_multireddit.yml
149
+ - spec/cassettes/RedditKit_Client_Multireddits/_rename_multireddit/renames_a_multireddit.yml
150
+ - spec/cassettes/RedditKit_Client_Multireddits/_set_multireddit_description/returns_a_multireddit_description.yml
151
+ - spec/cassettes/RedditKit_Client_Multireddits/_update_multireddit/updates_a_multireddit.yml
152
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_block_author_of_message/requests_the_correct_resource.yml
153
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_mark_as_read/requests_the_correct_resource.yml
154
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_mark_as_unread/requests_the_correct_resource.yml
155
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_messages/requests_the_correct_resource.yml
156
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_unblock/requests_the_correct_resource.yml
157
+ - spec/cassettes/RedditKit_Client_Search/_search/restricts_searches_to_a_specific_subreddit.yml
158
+ - spec/cassettes/RedditKit_Client_Search/_search/returns_a_specific_number_of_results.yml
159
+ - spec/cassettes/RedditKit_Client_Search/_search/returns_search_results.yml
160
+ - spec/cassettes/RedditKit_Client_Subreddits/_random_subreddit/returns_a_random_subreddit.yml
161
+ - spec/cassettes/RedditKit_Client_Subreddits/_recommended_subreddits/returns_subreddit_names.yml
162
+ - spec/cassettes/RedditKit_Client_Subreddits/_search_subreddits_by_name/returns_subreddit_names.yml
163
+ - spec/cassettes/RedditKit_Client_Subreddits/_subreddit/returns_a_specified_subreddit.yml
164
+ - spec/cassettes/RedditKit_Client_Subreddits/_subreddits/returns_a_specified_number_of_subreddits.yml
165
+ - spec/cassettes/RedditKit_Client_Subreddits/_subreddits/returns_subreddits_from_a_specific_category.yml
166
+ - spec/cassettes/RedditKit_Client_Subreddits/_subreddits_by_topic/returns_subreddit_names.yml
167
+ - spec/cassettes/RedditKit_Client_Subreddits/_subscribe/requests_the_correct_resource.yml
168
+ - spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_a_specified_number_of_subreddits.yml
169
+ - spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_subreddits_from_a_specific_category.yml
170
+ - spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_the_user_s_subscribed_subreddits.yml
171
+ - spec/cassettes/RedditKit_Client_Subreddits/_unsubscribe/requests_the_correct_resource.yml
172
+ - spec/cassettes/RedditKit_Client_Users/_friends/returns_the_user_s_friends.yml
173
+ - spec/cassettes/RedditKit_Client_Users/_my_content/returns_the_user_s_content.yml
174
+ - spec/cassettes/RedditKit_Client_Users/_user/requests_the_correct_resource.yml
175
+ - spec/cassettes/RedditKit_Client_Users/_user/returns_a_specified_user.yml
176
+ - spec/cassettes/RedditKit_Client_Users/_user/returns_the_authenticated_user.yml
177
+ - spec/cassettes/RedditKit_Client_Users/_user_content/returns_the_user_s_content.yml
178
+ - spec/cassettes/RedditKit_Client_Users/_username_available_/returns_false_for_an_unavailable_username.yml
179
+ - spec/cassettes/RedditKit_Client_Users/_username_available_/returns_true_for_an_available_username.yml
180
+ - spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_comment_full_name_passed/downvotes_the_comment.yml
181
+ - spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_comment_passed/downvotes_the_comment.yml
182
+ - spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_link_full_name_passed/downvotes_the_link.yml
183
+ - spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_link_passed/downvotes_the_link.yml
184
+ - spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_comment_full_name_passed/upvotes_the_comment.yml
185
+ - spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_comment_passed/upvotes_the_comment.yml
186
+ - spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_link_full_name_passed/upvotes_the_link.yml
187
+ - spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_link_passed/upvotes_the_link.yml
188
+ - spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_comment_full_name_passed/withdraws_the_vote_on_the_comment.yml
189
+ - spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_comment_passed/withdraws_the_vote_on_the_comment.yml
190
+ - spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_link_full_name_passed/withdraws_the_vote_on_the_link.yml
191
+ - spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_link_passed/withdraws_the_vote_on_the_link.yml
192
+ - spec/cassettes/RedditKit_Client_Wiki/_add_wiki_editor/requests_the_correct_resource.yml
193
+ - spec/cassettes/RedditKit_Client_Wiki/_edit_wiki_page/requests_the_correct_resource.yml
194
+ - spec/cassettes/RedditKit_Client_Wiki/_hide_wiki_revision/requests_the_correct_resource.yml
195
+ - spec/cassettes/RedditKit_Client_Wiki/_remove_wiki_editor/requests_the_correct_resource.yml
196
+ - spec/cassettes/RedditKit_Client_Wiki/_revert_to_revision/requests_the_correct_resource.yml
197
+ - spec/cassettes/RedditKit_Comment/should_not_be_deleted_if_neither_author_and_comment_attributes_are_set_to_deleted_.yml
198
+ - spec/cassettes/RedditKit_Comment/should_return_replies.yml
199
+ - spec/redditkit/base_spec.rb
200
+ - spec/redditkit/client/account_spec.rb
201
+ - spec/redditkit/client/apps_spec.rb
202
+ - spec/redditkit/client/captcha_spec.rb
203
+ - spec/redditkit/client/comments_spec.rb
204
+ - spec/redditkit/client/flair_spec.rb
205
+ - spec/redditkit/client/links_spec.rb
206
+ - spec/redditkit/client/miscellaneous_spec.rb
207
+ - spec/redditkit/client/moderation_spec.rb
208
+ - spec/redditkit/client/multireddits_spec.rb
209
+ - spec/redditkit/client/private_messages_spec.rb
210
+ - spec/redditkit/client/search_spec.rb
211
+ - spec/redditkit/client/subreddits_spec.rb
212
+ - spec/redditkit/client/users_spec.rb
213
+ - spec/redditkit/client/voting_spec.rb
214
+ - spec/redditkit/client/wiki_spec.rb
215
+ - spec/redditkit/client_spec.rb
216
+ - spec/redditkit/comment_spec.rb
217
+ - spec/redditkit/creatable_spec.rb
218
+ - spec/redditkit/error_spec.rb
219
+ - spec/redditkit/link_spec.rb
220
+ - spec/redditkit/multireddit_spec.rb
221
+ - spec/redditkit/paginated_response_spec.rb
222
+ - spec/redditkit/thing_spec.rb
223
+ - spec/redditkit/votable_spec.rb
224
+ - spec/redditkit_spec.rb
225
+ - spec/spec_helper.rb
226
+ homepage: http://redditkit.com/
227
+ licenses:
228
+ - MIT
229
+ metadata: {}
230
+ post_install_message:
231
+ rdoc_options: []
232
+ require_paths:
233
+ - lib
234
+ required_ruby_version: !ruby/object:Gem::Requirement
235
+ requirements:
236
+ - - ">="
237
+ - !ruby/object:Gem::Version
238
+ version: '0'
239
+ required_rubygems_version: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ requirements: []
245
+ rubyforge_project:
246
+ rubygems_version: 2.1.10
247
+ signing_key:
248
+ specification_version: 4
249
+ summary: A simple reddit API library.
250
+ test_files:
251
+ - spec/cassettes/authenticated_client.yml
252
+ - spec/cassettes/RedditKit_Client/should_raise_an_error_with_invalid_credentials.yml
253
+ - spec/cassettes/RedditKit_Client_Account/_sign_in/signs_the_user_in.yml
254
+ - spec/cassettes/RedditKit_Client_Account/_update_session/updates_the_current_session.yml
255
+ - spec/cassettes/RedditKit_Client_Captcha/_captcha_url/returns_a_CAPTCHA_url_from_an_identifier.yml
256
+ - spec/cassettes/RedditKit_Client_Captcha/_needs_captcha_/checks_if_the_current_account_needs_a_CAPTCHA.yml
257
+ - spec/cassettes/RedditKit_Client_Captcha/_new_captcha_identifier/returns_a_new_CAPTCHA_identifier.yml
258
+ - spec/cassettes/RedditKit_Client_Comments/_comment/requests_the_correct_resource.yml
259
+ - spec/cassettes/RedditKit_Client_Comments/_comments/with_a_link_identifier/returns_comments_on_a_link.yml
260
+ - spec/cassettes/RedditKit_Client_Comments/_comments/with_a_RedditKit_Link/returns_comments_on_a_link.yml
261
+ - spec/cassettes/RedditKit_Client_Comments/_submit_comment/requests_the_correct_resource.yml
262
+ - spec/cassettes/RedditKit_Client_Flair/_apply_flair_template/clears_flair_templates.yml
263
+ - spec/cassettes/RedditKit_Client_Flair/_clear_flair_templates/clears_flair_templates.yml
264
+ - spec/cassettes/RedditKit_Client_Flair/_create_flair_template/creates_a_flair_template.yml
265
+ - spec/cassettes/RedditKit_Client_Flair/_create_flair_template/raises_InvalidClassName.yml
266
+ - spec/cassettes/RedditKit_Client_Flair/_create_flair_template/raises_TooManyClassNames.yml
267
+ - spec/cassettes/RedditKit_Client_Flair/_delete_user_flair/requests_the_correct_resource.yml
268
+ - spec/cassettes/RedditKit_Client_Flair/_flair_list/returns_the_list_of_flair.yml
269
+ - spec/cassettes/RedditKit_Client_Flair/_set_flair/requests_the_correct_resource.yml
270
+ - spec/cassettes/RedditKit_Client_Flair/_set_flair_options/sets_flair_options.yml
271
+ - spec/cassettes/RedditKit_Client_Flair/_set_flair_with_csv/requests_the_correct_resource.yml
272
+ - spec/cassettes/RedditKit_Client_Flair/_toggle_flair/requests_the_correct_resource.yml
273
+ - spec/cassettes/RedditKit_Client_Links/_front_page/requests_the_correct_category.yml
274
+ - spec/cassettes/RedditKit_Client_Links/_front_page/requests_the_correct_resource.yml
275
+ - spec/cassettes/RedditKit_Client_Links/_hide/requests_the_correct_resource.yml
276
+ - spec/cassettes/RedditKit_Client_Links/_link/returns_a_link.yml
277
+ - spec/cassettes/RedditKit_Client_Links/_links/contains_pagination_information.yml
278
+ - spec/cassettes/RedditKit_Client_Links/_links/requests_a_certain_number_of_links.yml
279
+ - spec/cassettes/RedditKit_Client_Links/_links/requests_front_page_links_if_no_subreddit_is_present.yml
280
+ - spec/cassettes/RedditKit_Client_Links/_links/requests_links_with_the_correct_time_frame.yml
281
+ - spec/cassettes/RedditKit_Client_Links/_links/requests_the_correct_subreddit_and_category.yml
282
+ - spec/cassettes/RedditKit_Client_Links/_links_with_domain/returns_links_with_a_specific_domain.yml
283
+ - spec/cassettes/RedditKit_Client_Links/_mark_nsfw/requests_the_correct_resource.yml
284
+ - spec/cassettes/RedditKit_Client_Links/_random_link/returns_a_random_link.yml
285
+ - spec/cassettes/RedditKit_Client_Links/_submit/raises_RedditKit_InvalidCaptcha_if_no_CAPTCHA_is_filled_out.yml
286
+ - spec/cassettes/RedditKit_Client_Links/_unhide/requests_the_correct_resource.yml
287
+ - spec/cassettes/RedditKit_Client_Links/_unmark_nsfw/requests_the_correct_resource.yml
288
+ - spec/cassettes/RedditKit_Client_Miscellaneous/_delete/requests_the_correct_resource.yml
289
+ - spec/cassettes/RedditKit_Client_Miscellaneous/_edit/requests_the_correct_resource.yml
290
+ - spec/cassettes/RedditKit_Client_Miscellaneous/_save/saves_an_object.yml
291
+ - spec/cassettes/RedditKit_Client_Miscellaneous/_unsave/unsaves_an_object.yml
292
+ - spec/cassettes/RedditKit_Client_Moderation/_accept_moderator_invitation/requests_the_correct_resource.yml
293
+ - spec/cassettes/RedditKit_Client_Moderation/_ban/requests_the_correct_resource.yml
294
+ - spec/cassettes/RedditKit_Client_Moderation/_contributors_to_subreddit/requests_the_correct_resource.yml
295
+ - spec/cassettes/RedditKit_Client_Moderation/_ignore_reports/requests_the_correct_resource.yml
296
+ - spec/cassettes/RedditKit_Client_Moderation/_moderation_log/returns_RedditKit_ModeratorAction_objects.yml
297
+ - spec/cassettes/RedditKit_Client_Moderation/_moderators_of_subreddit/requests_the_correct_resource.yml
298
+ - spec/cassettes/RedditKit_Client_Moderation/_reset_subreddit_header/requests_the_correct_resource.yml
299
+ - spec/cassettes/RedditKit_Client_Moderation/_set_contest_mode/requests_the_correct_resource.yml
300
+ - spec/cassettes/RedditKit_Client_Moderation/_set_sticky_post/requests_the_correct_resource.yml
301
+ - spec/cassettes/RedditKit_Client_Moderation/_unban/requests_the_correct_resource.yml
302
+ - spec/cassettes/RedditKit_Client_Moderation/_unignore_reports/requests_the_correct_resource.yml
303
+ - spec/cassettes/RedditKit_Client_Multireddits/_add_subreddit_to_multireddit/adds_a_subreddit_to_a_multireddit.yml
304
+ - spec/cassettes/RedditKit_Client_Multireddits/_create_multireddit/creates_a_multireddit.yml
305
+ - spec/cassettes/RedditKit_Client_Multireddits/_create_multireddit/raises_RedditKit_Conflict_when_using_an_existing_name.yml
306
+ - spec/cassettes/RedditKit_Client_Multireddits/_delete_multireddit/deletes_a_multireddit.yml
307
+ - spec/cassettes/RedditKit_Client_Multireddits/_multireddit/with_a_path/returns_a_multireddit.yml
308
+ - spec/cassettes/RedditKit_Client_Multireddits/_multireddit/without_a_path/returns_a_multireddit.yml
309
+ - spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_multireddit/returns_a_multireddit_description.yml
310
+ - spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_username_and_multireddit_name/returns_a_multireddit_description.yml
311
+ - spec/cassettes/RedditKit_Client_Multireddits/_my_multireddits/return_s_the_user_s_multireddits.yml
312
+ - spec/cassettes/RedditKit_Client_Multireddits/_remove_subreddit_from_multireddit/removes_a_subreddit_from_a_multireddit.yml
313
+ - spec/cassettes/RedditKit_Client_Multireddits/_rename_multireddit/renames_a_multireddit.yml
314
+ - spec/cassettes/RedditKit_Client_Multireddits/_set_multireddit_description/returns_a_multireddit_description.yml
315
+ - spec/cassettes/RedditKit_Client_Multireddits/_update_multireddit/updates_a_multireddit.yml
316
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_block_author_of_message/requests_the_correct_resource.yml
317
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_mark_as_read/requests_the_correct_resource.yml
318
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_mark_as_unread/requests_the_correct_resource.yml
319
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_messages/requests_the_correct_resource.yml
320
+ - spec/cassettes/RedditKit_Client_PrivateMessages/_unblock/requests_the_correct_resource.yml
321
+ - spec/cassettes/RedditKit_Client_Search/_search/restricts_searches_to_a_specific_subreddit.yml
322
+ - spec/cassettes/RedditKit_Client_Search/_search/returns_a_specific_number_of_results.yml
323
+ - spec/cassettes/RedditKit_Client_Search/_search/returns_search_results.yml
324
+ - spec/cassettes/RedditKit_Client_Subreddits/_random_subreddit/returns_a_random_subreddit.yml
325
+ - spec/cassettes/RedditKit_Client_Subreddits/_recommended_subreddits/returns_subreddit_names.yml
326
+ - spec/cassettes/RedditKit_Client_Subreddits/_search_subreddits_by_name/returns_subreddit_names.yml
327
+ - spec/cassettes/RedditKit_Client_Subreddits/_subreddit/returns_a_specified_subreddit.yml
328
+ - spec/cassettes/RedditKit_Client_Subreddits/_subreddits/returns_a_specified_number_of_subreddits.yml
329
+ - spec/cassettes/RedditKit_Client_Subreddits/_subreddits/returns_subreddits_from_a_specific_category.yml
330
+ - spec/cassettes/RedditKit_Client_Subreddits/_subreddits_by_topic/returns_subreddit_names.yml
331
+ - spec/cassettes/RedditKit_Client_Subreddits/_subscribe/requests_the_correct_resource.yml
332
+ - spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_a_specified_number_of_subreddits.yml
333
+ - spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_subreddits_from_a_specific_category.yml
334
+ - spec/cassettes/RedditKit_Client_Subreddits/_subscribed_subreddits/returns_the_user_s_subscribed_subreddits.yml
335
+ - spec/cassettes/RedditKit_Client_Subreddits/_unsubscribe/requests_the_correct_resource.yml
336
+ - spec/cassettes/RedditKit_Client_Users/_friends/returns_the_user_s_friends.yml
337
+ - spec/cassettes/RedditKit_Client_Users/_my_content/returns_the_user_s_content.yml
338
+ - spec/cassettes/RedditKit_Client_Users/_user/requests_the_correct_resource.yml
339
+ - spec/cassettes/RedditKit_Client_Users/_user/returns_a_specified_user.yml
340
+ - spec/cassettes/RedditKit_Client_Users/_user/returns_the_authenticated_user.yml
341
+ - spec/cassettes/RedditKit_Client_Users/_user_content/returns_the_user_s_content.yml
342
+ - spec/cassettes/RedditKit_Client_Users/_username_available_/returns_false_for_an_unavailable_username.yml
343
+ - spec/cassettes/RedditKit_Client_Users/_username_available_/returns_true_for_an_available_username.yml
344
+ - spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_comment_full_name_passed/downvotes_the_comment.yml
345
+ - spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_comment_passed/downvotes_the_comment.yml
346
+ - spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_link_full_name_passed/downvotes_the_link.yml
347
+ - spec/cassettes/RedditKit_Client_Voting/_downvote/with_a_link_passed/downvotes_the_link.yml
348
+ - spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_comment_full_name_passed/upvotes_the_comment.yml
349
+ - spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_comment_passed/upvotes_the_comment.yml
350
+ - spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_link_full_name_passed/upvotes_the_link.yml
351
+ - spec/cassettes/RedditKit_Client_Voting/_upvote/with_a_link_passed/upvotes_the_link.yml
352
+ - spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_comment_full_name_passed/withdraws_the_vote_on_the_comment.yml
353
+ - spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_comment_passed/withdraws_the_vote_on_the_comment.yml
354
+ - spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_link_full_name_passed/withdraws_the_vote_on_the_link.yml
355
+ - spec/cassettes/RedditKit_Client_Voting/_withdraw_vote/with_a_link_passed/withdraws_the_vote_on_the_link.yml
356
+ - spec/cassettes/RedditKit_Client_Wiki/_add_wiki_editor/requests_the_correct_resource.yml
357
+ - spec/cassettes/RedditKit_Client_Wiki/_edit_wiki_page/requests_the_correct_resource.yml
358
+ - spec/cassettes/RedditKit_Client_Wiki/_hide_wiki_revision/requests_the_correct_resource.yml
359
+ - spec/cassettes/RedditKit_Client_Wiki/_remove_wiki_editor/requests_the_correct_resource.yml
360
+ - spec/cassettes/RedditKit_Client_Wiki/_revert_to_revision/requests_the_correct_resource.yml
361
+ - spec/cassettes/RedditKit_Comment/should_not_be_deleted_if_neither_author_and_comment_attributes_are_set_to_deleted_.yml
362
+ - spec/cassettes/RedditKit_Comment/should_return_replies.yml
363
+ - spec/redditkit/base_spec.rb
364
+ - spec/redditkit/client/account_spec.rb
365
+ - spec/redditkit/client/apps_spec.rb
366
+ - spec/redditkit/client/captcha_spec.rb
367
+ - spec/redditkit/client/comments_spec.rb
368
+ - spec/redditkit/client/flair_spec.rb
369
+ - spec/redditkit/client/links_spec.rb
370
+ - spec/redditkit/client/miscellaneous_spec.rb
371
+ - spec/redditkit/client/moderation_spec.rb
372
+ - spec/redditkit/client/multireddits_spec.rb
373
+ - spec/redditkit/client/private_messages_spec.rb
374
+ - spec/redditkit/client/search_spec.rb
375
+ - spec/redditkit/client/subreddits_spec.rb
376
+ - spec/redditkit/client/users_spec.rb
377
+ - spec/redditkit/client/voting_spec.rb
378
+ - spec/redditkit/client/wiki_spec.rb
379
+ - spec/redditkit/client_spec.rb
380
+ - spec/redditkit/comment_spec.rb
381
+ - spec/redditkit/creatable_spec.rb
382
+ - spec/redditkit/error_spec.rb
383
+ - spec/redditkit/link_spec.rb
384
+ - spec/redditkit/multireddit_spec.rb
385
+ - spec/redditkit/paginated_response_spec.rb
386
+ - spec/redditkit/thing_spec.rb
387
+ - spec/redditkit/votable_spec.rb
388
+ - spec/redditkit_spec.rb
389
+ - spec/spec_helper.rb
390
+ has_rdoc: