redditkit 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -4
  3. data/lib/redditkit.rb +4 -3
  4. data/lib/redditkit/client.rb +6 -8
  5. data/lib/redditkit/client/apps.rb +8 -8
  6. data/lib/redditkit/client/captcha.rb +2 -2
  7. data/lib/redditkit/client/comments.rb +2 -2
  8. data/lib/redditkit/client/flair.rb +10 -8
  9. data/lib/redditkit/client/links.rb +24 -20
  10. data/lib/redditkit/client/miscellaneous.rb +10 -10
  11. data/lib/redditkit/client/moderation.rb +23 -21
  12. data/lib/redditkit/client/multireddits.rb +4 -4
  13. data/lib/redditkit/client/private_messages.rb +6 -4
  14. data/lib/redditkit/client/search.rb +1 -1
  15. data/lib/redditkit/client/subreddits.rb +11 -7
  16. data/lib/redditkit/client/users.rb +17 -14
  17. data/lib/redditkit/client/utilities.rb +10 -8
  18. data/lib/redditkit/client/voting.rb +5 -5
  19. data/lib/redditkit/client/wiki.rb +4 -0
  20. data/lib/redditkit/comment.rb +4 -4
  21. data/lib/redditkit/error.rb +3 -3
  22. data/lib/redditkit/link.rb +14 -14
  23. data/lib/redditkit/moderator_action.rb +4 -4
  24. data/lib/redditkit/multireddit.rb +2 -2
  25. data/lib/redditkit/multireddit_description.rb +2 -2
  26. data/lib/redditkit/private_message.rb +2 -2
  27. data/lib/redditkit/response/parse_json.rb +7 -1
  28. data/lib/redditkit/response/raise_error.rb +4 -5
  29. data/lib/redditkit/subreddit.rb +13 -10
  30. data/lib/redditkit/thing.rb +1 -0
  31. data/lib/redditkit/user.rb +12 -8
  32. data/lib/redditkit/version.rb +1 -5
  33. data/lib/redditkit/votable.rb +2 -2
  34. data/redditkit.gemspec +1 -1
  35. data/spec/cassettes/RedditKit_Client_Flair/_flair_list/returns_the_list_of_flair.yml +51 -4
  36. data/spec/cassettes/RedditKit_Client_Moderation/_ban/requests_the_correct_resource.yml +70 -23
  37. data/spec/cassettes/RedditKit_Client_Moderation/_contributors_to_subreddit/requests_the_correct_resource.yml +52 -5
  38. data/spec/cassettes/RedditKit_Client_Moderation/_moderation_log/returns_RedditKit_ModeratorAction_objects.yml +150 -109
  39. data/spec/cassettes/RedditKit_Client_Moderation/_moderators_of_subreddit/requests_the_correct_resource.yml +53 -6
  40. data/spec/cassettes/RedditKit_Client_Moderation/_unban/requests_the_correct_resource.yml +61 -14
  41. data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit/without_a_path/returns_a_multireddit.yml +49 -7
  42. data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_multireddit/returns_a_multireddit_description.yml +102 -11
  43. data/spec/cassettes/RedditKit_Client_Multireddits/_multireddit_description/with_a_username_and_multireddit_name/returns_a_multireddit_description.yml +54 -5
  44. data/spec/cassettes/RedditKit_Client_Search/_search/restricts_searches_to_a_specific_subreddit.yml +925 -0
  45. data/spec/cassettes/RedditKit_Client_Search/_search/returns_a_specific_number_of_results.yml +116 -0
  46. data/spec/cassettes/RedditKit_Client_Search/_search/returns_search_results.yml +884 -0
  47. data/spec/cassettes/RedditKit_Client_Wiki/_add_wiki_editor/requests_the_correct_resource.yml +58 -4
  48. data/spec/cassettes/RedditKit_Client_Wiki/_edit_wiki_page/requests_the_correct_resource.yml +58 -4
  49. data/spec/cassettes/RedditKit_Client_Wiki/_hide_wiki_revision/requests_the_correct_resource.yml +58 -4
  50. data/spec/cassettes/RedditKit_Client_Wiki/_remove_wiki_editor/requests_the_correct_resource.yml +58 -4
  51. data/spec/cassettes/RedditKit_Client_Wiki/_revert_to_revision/requests_the_correct_resource.yml +58 -4
  52. data/spec/redditkit/comment_spec.rb +6 -6
  53. data/spec/redditkit/link_spec.rb +38 -7
  54. data/spec/redditkit/thing_spec.rb +8 -0
  55. data/spec/redditkit/user_spec.rb +14 -0
  56. data/spec/spec_helper.rb +0 -4
  57. metadata +7 -11
@@ -43,6 +43,8 @@ module RedditKit
43
43
  # @option options [String] revision The revision to hide.
44
44
  # @return [Boolean] True if the revision is now hidden, false if it is not hidden.
45
45
  def hide_wiki_revision(options)
46
+ options = options.clone
47
+
46
48
  subreddit_name = extract_string(options[:subreddit], :display_name)
47
49
  options.delete :subreddit
48
50
 
@@ -56,6 +58,8 @@ module RedditKit
56
58
  # @option options [String] page The name of an existing wiki page.
57
59
  # @option options [String] revision The revision to revert to.
58
60
  def revert_to_revision(options)
61
+ options = options.clone
62
+
59
63
  subreddit_name = extract_string(options[:subreddit], :display_name)
60
64
  options.delete :subreddit
61
65
 
@@ -26,8 +26,8 @@ module RedditKit
26
26
  attr_reader :subreddit
27
27
  attr_reader :subreddit_id
28
28
 
29
- alias text body
30
- alias posted_at created_at
29
+ alias_method :text, :body
30
+ alias_method :posted_at, :created_at
31
31
 
32
32
  # Whether a comment has been deleted by its submitter or a moderator.
33
33
  def deleted?
@@ -37,12 +37,12 @@ module RedditKit
37
37
  # The replies to a comment.
38
38
  def replies
39
39
  replies_listing = @attributes[:replies]
40
- return Array.new if replies_listing.empty?
40
+ return [] if replies_listing.blank?
41
41
 
42
42
  replies_array = replies_listing[:data][:children]
43
43
 
44
44
  @comment_objects ||= replies_array.map do |comment|
45
- RedditKit::Comment.new(comment)
45
+ RedditKit::Comment.new(comment)
46
46
  end
47
47
  end
48
48
 
@@ -6,7 +6,7 @@ module RedditKit
6
6
 
7
7
  def from_status_code_and_body(status_code, body)
8
8
  error_value = extract_error_value body
9
- return if status_code == 200 and error_value.nil?
9
+ return if status_code == 200 && error_value.nil?
10
10
 
11
11
  case status_code
12
12
  when 200
@@ -53,7 +53,7 @@ module RedditKit
53
53
  def extract_error_value(body)
54
54
  return nil unless body.instance_of? Hash
55
55
 
56
- if body.key?(:json) and body[:json].key?(:errors)
56
+ if body.key?(:json) && body[:json].key?(:errors)
57
57
  body[:json][:errors].to_s
58
58
  elsif body.key?(:jquery)
59
59
  body[:jquery].to_s
@@ -74,7 +74,7 @@ module RedditKit
74
74
 
75
75
  # Raised when the user attempts to create a multireddit with an invalid name.
76
76
  class InvalidMultiredditName < Error; end
77
-
77
+
78
78
  # Raised when reddit returns a 409 status code.
79
79
  class Conflict < Error; end
80
80
 
@@ -93,18 +93,18 @@ module RedditKit
93
93
 
94
94
  # Whether the link has been visited by the current user. Requires that the current user have reddit gold.
95
95
  attr_reader :visited
96
-
97
- alias approved? approved_by
98
- alias banned? banned_by
99
- alias nsfw? over_18
100
- alias self_post? is_self
101
- alias sticky? stickied
102
- alias subreddit_full_name subreddit_id
103
- alias text selftext
104
- alias text_html selftext_html
105
- alias thumbnail_url thumbnail
106
- alias total_comments num_comments
107
- alias total_reports num_reports
96
+
97
+ alias_method :approved?, :approved_by
98
+ alias_method :banned?, :banned_by
99
+ alias_method :nsfw?, :over_18
100
+ alias_method :self_post?, :is_self
101
+ alias_method :sticky?, :stickied
102
+ alias_method :subreddit_full_name, :subreddit_id
103
+ alias_method :text, :selftext
104
+ alias_method :text_html, :selftext_html
105
+ alias_method :thumbnail_url, :thumbnail
106
+ alias_method :total_comments, :num_comments
107
+ alias_method :total_reports, :num_reports
108
108
 
109
109
  def title
110
110
  @escaped_title ||= HTMLEntities.new.decode(@attributes[:title])
@@ -133,11 +133,11 @@ module RedditKit
133
133
  # @return [Boolean]
134
134
  def image_link?
135
135
  extensions = %w(.png .jpg .jpeg .gif)
136
- extensions.any?{ |extension| url.end_with? extension }
136
+ extensions.any? { |extension| url.end_with? extension }
137
137
  end
138
138
 
139
139
  def permalink
140
- @permalink ||= "http://reddit.com/" << @attributes[:permalink]
140
+ @permalink ||= URI.join('http://www.reddit.com', URI.encode(@attributes[:permalink])).to_s
141
141
  end
142
142
 
143
143
  # Returns the short URL for a link.
@@ -10,10 +10,10 @@ module RedditKit
10
10
  attr_reader :subreddit
11
11
  attr_reader :sub_id36
12
12
 
13
- alias moderator_username mod
14
- alias moderator_identifier mod_id36
15
- alias subreddit_name subreddit
16
- alias subreddit_identifier sub_id36
13
+ alias_method :moderator_username, :mod
14
+ alias_method :moderator_identifier, :mod_id36
15
+ alias_method :subreddit_name, :subreddit
16
+ alias_method :subreddit_identifier, :sub_id36
17
17
 
18
18
  end
19
19
  end
@@ -12,13 +12,13 @@ module RedditKit
12
12
  attr_reader :visibility
13
13
  attr_reader :path
14
14
 
15
- alias editable? can_edit
15
+ alias_method :editable?, :can_edit
16
16
 
17
17
  # An array of subreddit display names.
18
18
  #
19
19
  # @return [Array<String>]
20
20
  def subreddits
21
- @subreddits ||= @attributes[:subreddits].collect { |subreddit| subreddit[:name] }
21
+ @subreddits ||= @attributes[:subreddits].map { |subreddit| subreddit[:name] }
22
22
  end
23
23
 
24
24
  # The username of the multireddit's owner.
@@ -4,11 +4,11 @@ module RedditKit
4
4
 
5
5
  # A class representing a multireddit description.
6
6
  class MultiredditDescription < RedditKit::Base
7
-
7
+
8
8
  attr_reader :body_html
9
9
  attr_reader :body_md
10
10
 
11
- alias text body_md
11
+ alias_method :text, :body_md
12
12
 
13
13
  end
14
14
  end
@@ -21,7 +21,7 @@ module RedditKit
21
21
  attr_reader :subreddit
22
22
  attr_reader :was_comment
23
23
 
24
- alias unread? new
25
- alias recipient dest
24
+ alias_method :unread?, :new
25
+ alias_method :recipient, :dest
26
26
  end
27
27
  end
@@ -20,10 +20,16 @@ module RedditKit
20
20
 
21
21
  def on_complete(env)
22
22
  if respond_to?(:parse)
23
- env[:body] = parse(env[:body]) unless [204, 301, 302, 304].include?(env[:status])
23
+ unless bad_status_codes.include? env[:status]
24
+ env[:body] = parse env[:body]
25
+ end
24
26
  end
25
27
  end
26
28
 
29
+ def bad_status_codes
30
+ @status_codes ||= [204, 301, 302, 304]
31
+ end
32
+
27
33
  end
28
34
  end
29
35
  end
@@ -5,17 +5,16 @@ module RedditKit
5
5
 
6
6
  # Methods for handling responses from reddit.
7
7
  module Response
8
- class RaiseError < Faraday::Response::Middleware
9
8
 
9
+ # Middleware for detecting errors from response codes and bodies.
10
+ class RaiseError < Faraday::Response::Middleware
10
11
  def on_complete(env)
11
12
  status_code = env[:status]
12
13
  body = env[:body]
13
14
 
14
- if error = RedditKit::Error.from_status_code_and_body(status_code, body)
15
- raise error
16
- end
15
+ error = RedditKit::Error.from_status_code_and_body(status_code, body)
16
+ fail error if error
17
17
  end
18
-
19
18
  end
20
19
  end
21
20
  end
@@ -72,15 +72,18 @@ module RedditKit
72
72
  # Whether the current user is a subscriber to the subreddit.
73
73
  attr_reader :user_is_subscriber
74
74
 
75
- alias banned? user_is_banned
76
- alias comment_spam_filter_strength spam_comments
77
- alias contributor? user_is_contributor
78
- alias link_spam_filter_strength spam_links
79
- alias moderator? user_is_moderator
80
- alias name display_name
81
- alias nsfw? over18
82
- alias self_post_spam_filter_strength spam_selfpost
83
- alias subscriber? user_is_subscriber
84
-
75
+ alias_method :banned?, :user_is_banned
76
+ alias_method :comment_spam_filter_strength, :spam_comments
77
+ alias_method :contributor?, :user_is_contributor
78
+ alias_method :link_spam_filter_strength, :spam_links
79
+ alias_method :moderator?, :user_is_moderator
80
+ alias_method :name, :display_name
81
+ alias_method :nsfw?, :over18
82
+ alias_method :self_post_spam_filter_strength, :spam_selfpost
83
+ alias_method :subscriber?, :user_is_subscriber
84
+
85
+ def uri
86
+ @uri ||= URI.join "http://www.reddit.com/r/", name
87
+ end
85
88
  end
86
89
  end
@@ -9,6 +9,7 @@ module RedditKit
9
9
  attr_reader :kind
10
10
 
11
11
  def ==(other)
12
+ return false unless other.is_a?(Thing)
12
13
  full_name == other.full_name
13
14
  end
14
15
 
@@ -18,13 +18,17 @@ module RedditKit
18
18
  attr_reader :is_mod
19
19
  attr_reader :over_18
20
20
 
21
- alias friend? is_friend
22
- alias gold? is_gold
23
- alias mail? has_mail
24
- alias mod? is_mod
25
- alias mod_mail? has_mod_mail
26
- alias over_18? over_18
27
- alias username name
28
- alias verified? has_verified_email
21
+ alias_method :friend?, :is_friend
22
+ alias_method :gold?, :is_gold
23
+ alias_method :mail?, :has_mail
24
+ alias_method :mod?, :is_mod
25
+ alias_method :mod_mail?, :has_mod_mail
26
+ alias_method :over_18?, :over_18
27
+ alias_method :username, :name
28
+ alias_method :verified?, :has_verified_email
29
+
30
+ def uri
31
+ @uri ||= URI.join "http://www.reddit.com/user/", username
32
+ end
29
33
  end
30
34
  end
@@ -4,16 +4,12 @@ module RedditKit
4
4
  class Version
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
- PATCH = 1
7
+ PATCH = 2
8
8
 
9
9
  class << self
10
-
11
- # Return RedditKit.rb's version number as a string.
12
10
  def to_s
13
11
  [MAJOR, MINOR, PATCH].join('.')
14
12
  end
15
-
16
13
  end
17
-
18
14
  end
19
15
  end
@@ -2,7 +2,7 @@ module RedditKit
2
2
 
3
3
  # Methods which determine the voting status of objects.
4
4
  module Votable
5
-
5
+
6
6
  # The number of upvotes an item has.
7
7
  def upvotes
8
8
  @attributes[:ups]
@@ -30,7 +30,7 @@ module RedditKit
30
30
 
31
31
  # Whether the user has voted on this item (either upvoted or downvoted).
32
32
  def voted?
33
- !@attributes[:likes].nil?
33
+ !@attributes[:likes].nil?
34
34
  end
35
35
 
36
36
  end
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_dependency 'htmlentities', "~> 4.3"
25
25
  spec.add_dependency 'multi_json', '~> 1.8'
26
26
 
27
- spec.add_development_dependency 'dotenv', '~> 0.9', '>= 0.9.0'
27
+ spec.add_development_dependency 'dotenv', '~> 0.11'
28
28
  end
@@ -16,7 +16,7 @@ http_interactions:
16
16
  Accept-Encoding:
17
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
18
  Accept:
19
- - "*/*"
19
+ - '*/*'
20
20
  response:
21
21
  status:
22
22
  code: 200
@@ -31,14 +31,61 @@ http_interactions:
31
31
  Pragma:
32
32
  - no-cache
33
33
  Server:
34
- - "'; DROP TABLE servertypes; --"
34
+ - '''; DROP TABLE servertypes; --'
35
35
  Date:
36
36
  - Sun, 10 Nov 2013 19:56:32 GMT
37
37
  Connection:
38
38
  - keep-alive
39
39
  body:
40
40
  encoding: UTF-8
41
- string: "{\"users\": []}"
41
+ string: '{"users": []}'
42
42
  http_version:
43
43
  recorded_at: Sun, 10 Nov 2013 19:56:31 GMT
44
- recorded_with: VCR 2.6.0
44
+ - request:
45
+ method: get
46
+ uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/api/flairlist.json
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ User-Agent:
52
+ - Faraday v0.8.8
53
+ Cookie:
54
+ - reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
55
+ X-Modhash:
56
+ - 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
57
+ Accept-Encoding:
58
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
59
+ Accept:
60
+ - '*/*'
61
+ response:
62
+ status:
63
+ code: 403
64
+ message: Forbidden
65
+ headers:
66
+ Content-Length:
67
+ - '14'
68
+ Content-Type:
69
+ - application/json; charset=UTF-8
70
+ Cache-Control:
71
+ - no-cache
72
+ Pragma:
73
+ - no-cache
74
+ X-Frame-Options:
75
+ - SAMEORIGIN
76
+ X-Content-Type-Options:
77
+ - nosniff
78
+ X-Xss-Protection:
79
+ - 1; mode=block
80
+ Server:
81
+ - '''; DROP TABLE servertypes; --'
82
+ Date:
83
+ - Wed, 29 Jan 2014 23:31:47 GMT
84
+ Connection:
85
+ - keep-alive
86
+ body:
87
+ encoding: UTF-8
88
+ string: '{"error": 403}'
89
+ http_version:
90
+ recorded_at: Wed, 29 Jan 2014 23:30:32 GMT
91
+ recorded_with: VCR 2.8.0
@@ -16,7 +16,7 @@ http_interactions:
16
16
  Accept-Encoding:
17
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
18
  Accept:
19
- - "*/*"
19
+ - '*/*'
20
20
  response:
21
21
  status:
22
22
  code: 200
@@ -31,24 +31,24 @@ http_interactions:
31
31
  Pragma:
32
32
  - no-cache
33
33
  Server:
34
- - "'; DROP TABLE servertypes; --"
34
+ - '''; DROP TABLE servertypes; --'
35
35
  Date:
36
36
  - Sun, 10 Nov 2013 22:21:38 GMT
37
37
  Connection:
38
38
  - keep-alive
39
39
  body:
40
40
  encoding: UTF-8
41
- string: "{\"kind\": \"t5\", \"data\": {\"submit_text_html\": null, \"user_is_banned\":
42
- false, \"id\": \"2ylc5\", \"submit_text\": \"\", \"spam_selfposts\": null,
43
- \"display_name\": \"RedditKitTesting\", \"header_img\": null, \"description_html\":
44
- null, \"title\": \"RedditKit Testing\", \"over18\": false, \"user_is_moderator\":
45
- true, \"header_title\": null, \"description\": \"\", \"submit_link_label\":
46
- null, \"accounts_active\": 6, \"spam_comments\": null, \"spam_links\": null,
47
- \"header_size\": null, \"subscribers\": 1, \"submit_text_label\": null, \"name\":
48
- \"t5_2ylc5\", \"created\": 1379988259.0, \"url\": \"/r/RedditKitTesting/\",
49
- \"created_utc\": 1379984659.0, \"user_is_contributor\": false, \"public_traffic\":
50
- false, \"public_description\": \"\", \"comment_score_hide_mins\": 0, \"subreddit_type\":
51
- \"public\", \"submission_type\": \"any\", \"user_is_subscriber\": false}}"
41
+ string: '{"kind": "t5", "data": {"submit_text_html": null, "user_is_banned":
42
+ false, "id": "2ylc5", "submit_text": "", "spam_selfposts": null, "display_name":
43
+ "RedditKitTesting", "header_img": null, "description_html": null, "title":
44
+ "RedditKit Testing", "over18": false, "user_is_moderator": true, "header_title":
45
+ null, "description": "", "submit_link_label": null, "accounts_active": 6,
46
+ "spam_comments": null, "spam_links": null, "header_size": null, "subscribers":
47
+ 1, "submit_text_label": null, "name": "t5_2ylc5", "created": 1379988259.0,
48
+ "url": "/r/RedditKitTesting/", "created_utc": 1379984659.0, "user_is_contributor":
49
+ false, "public_traffic": false, "public_description": "", "comment_score_hide_mins":
50
+ 0, "subreddit_type": "public", "submission_type": "any", "user_is_subscriber":
51
+ false}}'
52
52
  http_version:
53
53
  recorded_at: Sun, 10 Nov 2013 22:21:37 GMT
54
54
  - request:
@@ -69,7 +69,7 @@ http_interactions:
69
69
  Accept-Encoding:
70
70
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
71
71
  Accept:
72
- - "*/*"
72
+ - '*/*'
73
73
  response:
74
74
  status:
75
75
  code: 200
@@ -84,20 +84,67 @@ http_interactions:
84
84
  Pragma:
85
85
  - no-cache
86
86
  Server:
87
- - "'; DROP TABLE servertypes; --"
87
+ - '''; DROP TABLE servertypes; --'
88
88
  Date:
89
89
  - Sun, 10 Nov 2013 22:21:38 GMT
90
90
  Connection:
91
91
  - keep-alive
92
92
  body:
93
93
  encoding: UTF-8
94
- string: "{\"jquery\": [[0, 1, \"call\", [\"body\"]], [1, 2, \"attr\", \"find\"],
95
- [2, 3, \"call\", [\".status\"]], [3, 4, \"attr\", \"hide\"], [4, 5, \"call\",
96
- []], [5, 6, \"attr\", \"html\"], [6, 7, \"call\", [\"\"]], [7, 8, \"attr\",
97
- \"end\"], [8, 9, \"call\", []], [1, 10, \"attr\", \"find\"], [10, 11, \"call\",
98
- [\".error.NO_USER.field-name\"]], [11, 12, \"attr\", \"show\"], [12, 13, \"call\",
99
- []], [13, 14, \"attr\", \"text\"], [14, 15, \"call\", [\"please enter a username\"]],
100
- [15, 16, \"attr\", \"end\"], [16, 17, \"call\", []]]}"
94
+ string: '{"jquery": [[0, 1, "call", ["body"]], [1, 2, "attr", "find"], [2, 3,
95
+ "call", [".status"]], [3, 4, "attr", "hide"], [4, 5, "call", []], [5, 6, "attr",
96
+ "html"], [6, 7, "call", [""]], [7, 8, "attr", "end"], [8, 9, "call", []],
97
+ [1, 10, "attr", "find"], [10, 11, "call", [".error.NO_USER.field-name"]],
98
+ [11, 12, "attr", "show"], [12, 13, "call", []], [13, 14, "attr", "text"],
99
+ [14, 15, "call", ["please enter a username"]], [15, 16, "attr", "end"], [16,
100
+ 17, "call", []]]}'
101
101
  http_version:
102
102
  recorded_at: Sun, 10 Nov 2013 22:21:37 GMT
103
- recorded_with: VCR 2.6.0
103
+ - request:
104
+ method: get
105
+ uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/about.json
106
+ body:
107
+ encoding: US-ASCII
108
+ string: ''
109
+ headers:
110
+ User-Agent:
111
+ - Faraday v0.8.8
112
+ Cookie:
113
+ - reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
114
+ X-Modhash:
115
+ - 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
116
+ Accept-Encoding:
117
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
118
+ Accept:
119
+ - '*/*'
120
+ response:
121
+ status:
122
+ code: 403
123
+ message: Forbidden
124
+ headers:
125
+ Content-Length:
126
+ - '14'
127
+ Content-Type:
128
+ - application/json; charset=UTF-8
129
+ Cache-Control:
130
+ - no-cache
131
+ Pragma:
132
+ - no-cache
133
+ X-Frame-Options:
134
+ - SAMEORIGIN
135
+ X-Content-Type-Options:
136
+ - nosniff
137
+ X-Xss-Protection:
138
+ - 1; mode=block
139
+ Server:
140
+ - '''; DROP TABLE servertypes; --'
141
+ Date:
142
+ - Wed, 29 Jan 2014 23:31:48 GMT
143
+ Connection:
144
+ - keep-alive
145
+ body:
146
+ encoding: UTF-8
147
+ string: '{"error": 403}'
148
+ http_version:
149
+ recorded_at: Wed, 29 Jan 2014 23:30:33 GMT
150
+ recorded_with: VCR 2.8.0