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
@@ -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
@@ -33,15 +33,62 @@ http_interactions:
33
33
  X-Frame-Options:
34
34
  - DENY
35
35
  Server:
36
- - "'; DROP TABLE servertypes; --"
36
+ - '''; DROP TABLE servertypes; --'
37
37
  Date:
38
38
  - Sun, 10 Nov 2013 22:21:39 GMT
39
39
  Connection:
40
40
  - keep-alive
41
41
  body:
42
42
  encoding: UTF-8
43
- string: "{\"kind\": \"UserList\", \"data\": {\"children\": [{\"name\": \"samsymons\",
44
- \"id\": \"t2_614hc\"}]}}"
43
+ string: '{"kind": "UserList", "data": {"children": [{"name": "samsymons", "id":
44
+ "t2_614hc"}]}}'
45
45
  http_version:
46
46
  recorded_at: Sun, 10 Nov 2013 22:21:38 GMT
47
- recorded_with: VCR 2.6.0
47
+ - request:
48
+ method: get
49
+ uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/about/contributors.json
50
+ body:
51
+ encoding: US-ASCII
52
+ string: ''
53
+ headers:
54
+ User-Agent:
55
+ - Faraday v0.8.8
56
+ Cookie:
57
+ - reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
58
+ X-Modhash:
59
+ - 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
60
+ Accept-Encoding:
61
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
62
+ Accept:
63
+ - '*/*'
64
+ response:
65
+ status:
66
+ code: 403
67
+ message: Forbidden
68
+ headers:
69
+ Content-Length:
70
+ - '14'
71
+ Content-Type:
72
+ - application/json; charset=UTF-8
73
+ Cache-Control:
74
+ - no-cache
75
+ Pragma:
76
+ - no-cache
77
+ X-Frame-Options:
78
+ - SAMEORIGIN
79
+ X-Content-Type-Options:
80
+ - nosniff
81
+ X-Xss-Protection:
82
+ - 1; mode=block
83
+ Server:
84
+ - '''; DROP TABLE servertypes; --'
85
+ Date:
86
+ - Wed, 29 Jan 2014 23:31:49 GMT
87
+ Connection:
88
+ - keep-alive
89
+ body:
90
+ encoding: UTF-8
91
+ string: '{"error": 403}'
92
+ http_version:
93
+ recorded_at: Wed, 29 Jan 2014 23:30:34 GMT
94
+ 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,7 +31,7 @@ http_interactions:
31
31
  X-Frame-Options:
32
32
  - DENY
33
33
  Server:
34
- - "'; DROP TABLE servertypes; --"
34
+ - '''; DROP TABLE servertypes; --'
35
35
  Vary:
36
36
  - accept-encoding
37
37
  Date:
@@ -42,112 +42,153 @@ http_interactions:
42
42
  - keep-alive
43
43
  body:
44
44
  encoding: UTF-8
45
- string: "{\"kind\": \"Listing\", \"data\": {\"modhash\": \"lh315k2hi0cd3009c88b563d7ae978d0ad5c68418b9e585a75\",
46
- \"children\": [{\"kind\": \"modaction\", \"data\": {\"description\": null,
47
- \"mod_id36\": \"c3szt\", \"created_utc\": 1384122091.0, \"subreddit\": \"RedditKitTesting\",
48
- \"sr_id36\": \"2ylc5\", \"details\": \"Page fake-page edited\", \"action\":
49
- \"wikirevise\", \"target_fullname\": null, \"id\": \"ModAction_73585fea-4a56-11e3-b37a-12313b0cbc7a\",
50
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
51
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1384113407.0, \"subreddit\":
52
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"remove\", \"action\":
53
- \"marknsfw\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_3b746718-4a42-11e3-a4cd-12313b0ae6f4\",
54
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
55
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1384113403.0, \"subreddit\":
56
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"\", \"action\":
57
- \"marknsfw\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_391bca10-4a42-11e3-93d6-12313b074434\",
58
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
59
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1384113393.0, \"subreddit\":
60
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"add/edit flair\",
61
- \"action\": \"editflair\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_33102544-4a42-11e3-b3d8-12313d188143\",
62
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
63
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1384113393.0, \"subreddit\":
64
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"clear flair templates\",
65
- \"action\": \"editflair\", \"target_fullname\": null, \"id\": \"ModAction_32d01c2e-4a42-11e3-a8e8-12313b0ae6f4\",
66
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
67
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1384113391.0, \"subreddit\":
68
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"edit by csv\",
69
- \"action\": \"editflair\", \"target_fullname\": null, \"id\": \"ModAction_32167c56-4a42-11e3-8c22-12313b04ceaf\",
70
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
71
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1384113391.0, \"subreddit\":
72
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"add/edit flair\",
73
- \"action\": \"editflair\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_31cf7734-4a42-11e3-bc0f-12313d18f999\",
74
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
75
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1384113391.0, \"subreddit\":
76
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"delete flair\",
77
- \"action\": \"editflair\", \"target_fullname\": \"t2_614hc\", \"id\": \"ModAction_3187a9c2-4a42-11e3-84c9-12313b06ec01\",
78
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
79
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1384113389.0, \"subreddit\":
80
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"add/edit flair
81
- templates\", \"action\": \"editflair\", \"target_fullname\": null, \"id\":
82
- \"ModAction_30ae981c-4a42-11e3-a7cf-12313d21c4ee\", \"mod\": \"<REDDIT_USERNAME>\"}},
83
- {\"kind\": \"modaction\", \"data\": {\"description\": null, \"mod_id36\":
84
- \"c3szt\", \"created_utc\": 1383425103.0, \"subreddit\": \"RedditKitTesting\",
85
- \"sr_id36\": \"2ylc5\", \"details\": \"remove\", \"action\": \"marknsfw\",
86
- \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_a614b616-43ff-11e3-b94a-12313d188143\",
87
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
88
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1383425101.0, \"subreddit\":
89
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"\", \"action\":
90
- \"marknsfw\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_a4e8db28-43ff-11e3-8a85-12313b06ec01\",
91
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
92
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382370348.0, \"subreddit\":
93
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"add/edit flair\",
94
- \"action\": \"editflair\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_db6e7974-3a67-11e3-9c19-12313b0111fc\",
95
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
96
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382370347.0, \"subreddit\":
97
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"add/edit flair
98
- templates\", \"action\": \"editflair\", \"target_fullname\": null, \"id\":
99
- \"ModAction_daccab6c-3a67-11e3-b5af-12313d188143\", \"mod\": \"<REDDIT_USERNAME>\"}},
100
- {\"kind\": \"modaction\", \"data\": {\"description\": null, \"mod_id36\":
101
- \"c3szt\", \"created_utc\": 1382370347.0, \"subreddit\": \"RedditKitTesting\",
102
- \"sr_id36\": \"2ylc5\", \"details\": \"delete flair\", \"action\": \"editflair\",
103
- \"target_fullname\": \"t2_614hc\", \"id\": \"ModAction_da59b4d6-3a67-11e3-9442-12313b0111fc\",
104
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
105
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382370345.0, \"subreddit\":
106
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"clear flair templates\",
107
- \"action\": \"editflair\", \"target_fullname\": null, \"id\": \"ModAction_d9ac40f8-3a67-11e3-b2fb-12313d184137\",
108
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
109
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382370345.0, \"subreddit\":
110
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"add/edit flair\",
111
- \"action\": \"editflair\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_d962795a-3a67-11e3-a0f1-12313b0ae6f4\",
112
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
113
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382370344.0, \"subreddit\":
114
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"edit by csv\",
115
- \"action\": \"editflair\", \"target_fullname\": null, \"id\": \"ModAction_d8d845c8-3a67-11e3-aee4-12313d21c4ee\",
116
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
117
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382336501.0, \"subreddit\":
118
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"\", \"action\":
119
- \"marknsfw\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_0c931342-3a19-11e3-b9b4-12313b079641\",
120
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
121
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382336496.0, \"subreddit\":
122
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"remove\", \"action\":
123
- \"marknsfw\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_09d49504-3a19-11e3-9cfe-12313d18f999\",
124
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
125
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382336486.0, \"subreddit\":
126
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"\", \"action\":
127
- \"sticky\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_04090e48-3a19-11e3-b0ea-12313b074434\",
128
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
129
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382336485.0, \"subreddit\":
130
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"\", \"action\":
131
- \"ignorereports\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_03573f06-3a19-11e3-9626-12313b0111fc\",
132
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
133
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382336460.0, \"subreddit\":
134
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"Page fake-page
135
- edited\", \"action\": \"wikirevise\", \"target_fullname\": null, \"id\": \"ModAction_f4924542-3a18-11e3-8065-12313b0cbc7a\",
136
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
137
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1382051881.0, \"subreddit\":
138
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"add/edit flair
139
- templates\", \"action\": \"editflair\", \"target_fullname\": null, \"id\":
140
- \"ModAction_5e444eca-3782-11e3-ac14-12313b0111fc\", \"mod\": \"<REDDIT_USERNAME>\"}},
141
- {\"kind\": \"modaction\", \"data\": {\"description\": null, \"mod_id36\":
142
- \"c3szt\", \"created_utc\": 1381941003.0, \"subreddit\": \"RedditKitTesting\",
143
- \"sr_id36\": \"2ylc5\", \"details\": \"\", \"action\": \"unignorereports\",
144
- \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_35b23524-3680-11e3-9024-12313d21c4ee\",
145
- \"mod\": \"<REDDIT_USERNAME>\"}}, {\"kind\": \"modaction\", \"data\": {\"description\":
146
- null, \"mod_id36\": \"c3szt\", \"created_utc\": 1381940949.0, \"subreddit\":
147
- \"RedditKitTesting\", \"sr_id36\": \"2ylc5\", \"details\": \"\", \"action\":
148
- \"ignorereports\", \"target_fullname\": \"t3_1n002d\", \"id\": \"ModAction_15904024-3680-11e3-91a6-12313d184137\",
149
- \"mod\": \"<REDDIT_USERNAME>\"}}], \"after\": \"ModAction_15904024-3680-11e3-91a6-12313d184137\",
150
- \"before\": null}}"
45
+ string: '{"kind": "Listing", "data": {"modhash": "lh315k2hi0cd3009c88b563d7ae978d0ad5c68418b9e585a75",
46
+ "children": [{"kind": "modaction", "data": {"description": null, "mod_id36":
47
+ "c3szt", "created_utc": 1384122091.0, "subreddit": "RedditKitTesting", "sr_id36":
48
+ "2ylc5", "details": "Page fake-page edited", "action": "wikirevise", "target_fullname":
49
+ null, "id": "ModAction_73585fea-4a56-11e3-b37a-12313b0cbc7a", "mod": "<REDDIT_USERNAME>"}},
50
+ {"kind": "modaction", "data": {"description": null, "mod_id36": "c3szt", "created_utc":
51
+ 1384113407.0, "subreddit": "RedditKitTesting", "sr_id36": "2ylc5", "details":
52
+ "remove", "action": "marknsfw", "target_fullname": "t3_1n002d", "id": "ModAction_3b746718-4a42-11e3-a4cd-12313b0ae6f4",
53
+ "mod": "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description":
54
+ null, "mod_id36": "c3szt", "created_utc": 1384113403.0, "subreddit": "RedditKitTesting",
55
+ "sr_id36": "2ylc5", "details": "", "action": "marknsfw", "target_fullname":
56
+ "t3_1n002d", "id": "ModAction_391bca10-4a42-11e3-93d6-12313b074434", "mod":
57
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
58
+ "mod_id36": "c3szt", "created_utc": 1384113393.0, "subreddit": "RedditKitTesting",
59
+ "sr_id36": "2ylc5", "details": "add/edit flair", "action": "editflair", "target_fullname":
60
+ "t3_1n002d", "id": "ModAction_33102544-4a42-11e3-b3d8-12313d188143", "mod":
61
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
62
+ "mod_id36": "c3szt", "created_utc": 1384113393.0, "subreddit": "RedditKitTesting",
63
+ "sr_id36": "2ylc5", "details": "clear flair templates", "action": "editflair",
64
+ "target_fullname": null, "id": "ModAction_32d01c2e-4a42-11e3-a8e8-12313b0ae6f4",
65
+ "mod": "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description":
66
+ null, "mod_id36": "c3szt", "created_utc": 1384113391.0, "subreddit": "RedditKitTesting",
67
+ "sr_id36": "2ylc5", "details": "edit by csv", "action": "editflair", "target_fullname":
68
+ null, "id": "ModAction_32167c56-4a42-11e3-8c22-12313b04ceaf", "mod": "<REDDIT_USERNAME>"}},
69
+ {"kind": "modaction", "data": {"description": null, "mod_id36": "c3szt", "created_utc":
70
+ 1384113391.0, "subreddit": "RedditKitTesting", "sr_id36": "2ylc5", "details":
71
+ "add/edit flair", "action": "editflair", "target_fullname": "t3_1n002d", "id":
72
+ "ModAction_31cf7734-4a42-11e3-bc0f-12313d18f999", "mod": "<REDDIT_USERNAME>"}},
73
+ {"kind": "modaction", "data": {"description": null, "mod_id36": "c3szt", "created_utc":
74
+ 1384113391.0, "subreddit": "RedditKitTesting", "sr_id36": "2ylc5", "details":
75
+ "delete flair", "action": "editflair", "target_fullname": "t2_614hc", "id":
76
+ "ModAction_3187a9c2-4a42-11e3-84c9-12313b06ec01", "mod": "<REDDIT_USERNAME>"}},
77
+ {"kind": "modaction", "data": {"description": null, "mod_id36": "c3szt", "created_utc":
78
+ 1384113389.0, "subreddit": "RedditKitTesting", "sr_id36": "2ylc5", "details":
79
+ "add/edit flair templates", "action": "editflair", "target_fullname": null,
80
+ "id": "ModAction_30ae981c-4a42-11e3-a7cf-12313d21c4ee", "mod": "<REDDIT_USERNAME>"}},
81
+ {"kind": "modaction", "data": {"description": null, "mod_id36": "c3szt", "created_utc":
82
+ 1383425103.0, "subreddit": "RedditKitTesting", "sr_id36": "2ylc5", "details":
83
+ "remove", "action": "marknsfw", "target_fullname": "t3_1n002d", "id": "ModAction_a614b616-43ff-11e3-b94a-12313d188143",
84
+ "mod": "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description":
85
+ null, "mod_id36": "c3szt", "created_utc": 1383425101.0, "subreddit": "RedditKitTesting",
86
+ "sr_id36": "2ylc5", "details": "", "action": "marknsfw", "target_fullname":
87
+ "t3_1n002d", "id": "ModAction_a4e8db28-43ff-11e3-8a85-12313b06ec01", "mod":
88
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
89
+ "mod_id36": "c3szt", "created_utc": 1382370348.0, "subreddit": "RedditKitTesting",
90
+ "sr_id36": "2ylc5", "details": "add/edit flair", "action": "editflair", "target_fullname":
91
+ "t3_1n002d", "id": "ModAction_db6e7974-3a67-11e3-9c19-12313b0111fc", "mod":
92
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
93
+ "mod_id36": "c3szt", "created_utc": 1382370347.0, "subreddit": "RedditKitTesting",
94
+ "sr_id36": "2ylc5", "details": "add/edit flair templates", "action": "editflair",
95
+ "target_fullname": null, "id": "ModAction_daccab6c-3a67-11e3-b5af-12313d188143",
96
+ "mod": "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description":
97
+ null, "mod_id36": "c3szt", "created_utc": 1382370347.0, "subreddit": "RedditKitTesting",
98
+ "sr_id36": "2ylc5", "details": "delete flair", "action": "editflair", "target_fullname":
99
+ "t2_614hc", "id": "ModAction_da59b4d6-3a67-11e3-9442-12313b0111fc", "mod":
100
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
101
+ "mod_id36": "c3szt", "created_utc": 1382370345.0, "subreddit": "RedditKitTesting",
102
+ "sr_id36": "2ylc5", "details": "clear flair templates", "action": "editflair",
103
+ "target_fullname": null, "id": "ModAction_d9ac40f8-3a67-11e3-b2fb-12313d184137",
104
+ "mod": "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description":
105
+ null, "mod_id36": "c3szt", "created_utc": 1382370345.0, "subreddit": "RedditKitTesting",
106
+ "sr_id36": "2ylc5", "details": "add/edit flair", "action": "editflair", "target_fullname":
107
+ "t3_1n002d", "id": "ModAction_d962795a-3a67-11e3-a0f1-12313b0ae6f4", "mod":
108
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
109
+ "mod_id36": "c3szt", "created_utc": 1382370344.0, "subreddit": "RedditKitTesting",
110
+ "sr_id36": "2ylc5", "details": "edit by csv", "action": "editflair", "target_fullname":
111
+ null, "id": "ModAction_d8d845c8-3a67-11e3-aee4-12313d21c4ee", "mod": "<REDDIT_USERNAME>"}},
112
+ {"kind": "modaction", "data": {"description": null, "mod_id36": "c3szt", "created_utc":
113
+ 1382336501.0, "subreddit": "RedditKitTesting", "sr_id36": "2ylc5", "details":
114
+ "", "action": "marknsfw", "target_fullname": "t3_1n002d", "id": "ModAction_0c931342-3a19-11e3-b9b4-12313b079641",
115
+ "mod": "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description":
116
+ null, "mod_id36": "c3szt", "created_utc": 1382336496.0, "subreddit": "RedditKitTesting",
117
+ "sr_id36": "2ylc5", "details": "remove", "action": "marknsfw", "target_fullname":
118
+ "t3_1n002d", "id": "ModAction_09d49504-3a19-11e3-9cfe-12313d18f999", "mod":
119
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
120
+ "mod_id36": "c3szt", "created_utc": 1382336486.0, "subreddit": "RedditKitTesting",
121
+ "sr_id36": "2ylc5", "details": "", "action": "sticky", "target_fullname":
122
+ "t3_1n002d", "id": "ModAction_04090e48-3a19-11e3-b0ea-12313b074434", "mod":
123
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
124
+ "mod_id36": "c3szt", "created_utc": 1382336485.0, "subreddit": "RedditKitTesting",
125
+ "sr_id36": "2ylc5", "details": "", "action": "ignorereports", "target_fullname":
126
+ "t3_1n002d", "id": "ModAction_03573f06-3a19-11e3-9626-12313b0111fc", "mod":
127
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
128
+ "mod_id36": "c3szt", "created_utc": 1382336460.0, "subreddit": "RedditKitTesting",
129
+ "sr_id36": "2ylc5", "details": "Page fake-page edited", "action": "wikirevise",
130
+ "target_fullname": null, "id": "ModAction_f4924542-3a18-11e3-8065-12313b0cbc7a",
131
+ "mod": "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description":
132
+ null, "mod_id36": "c3szt", "created_utc": 1382051881.0, "subreddit": "RedditKitTesting",
133
+ "sr_id36": "2ylc5", "details": "add/edit flair templates", "action": "editflair",
134
+ "target_fullname": null, "id": "ModAction_5e444eca-3782-11e3-ac14-12313b0111fc",
135
+ "mod": "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description":
136
+ null, "mod_id36": "c3szt", "created_utc": 1381941003.0, "subreddit": "RedditKitTesting",
137
+ "sr_id36": "2ylc5", "details": "", "action": "unignorereports", "target_fullname":
138
+ "t3_1n002d", "id": "ModAction_35b23524-3680-11e3-9024-12313d21c4ee", "mod":
139
+ "<REDDIT_USERNAME>"}}, {"kind": "modaction", "data": {"description": null,
140
+ "mod_id36": "c3szt", "created_utc": 1381940949.0, "subreddit": "RedditKitTesting",
141
+ "sr_id36": "2ylc5", "details": "", "action": "ignorereports", "target_fullname":
142
+ "t3_1n002d", "id": "ModAction_15904024-3680-11e3-91a6-12313d184137", "mod":
143
+ "<REDDIT_USERNAME>"}}], "after": "ModAction_15904024-3680-11e3-91a6-12313d184137",
144
+ "before": null}}'
151
145
  http_version:
152
146
  recorded_at: Sun, 10 Nov 2013 22:21:35 GMT
153
- recorded_with: VCR 2.6.0
147
+ - request:
148
+ method: get
149
+ uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/about/log.json
150
+ body:
151
+ encoding: US-ASCII
152
+ string: ''
153
+ headers:
154
+ User-Agent:
155
+ - Faraday v0.8.8
156
+ Cookie:
157
+ - reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
158
+ X-Modhash:
159
+ - 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
160
+ Accept-Encoding:
161
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
162
+ Accept:
163
+ - '*/*'
164
+ response:
165
+ status:
166
+ code: 403
167
+ message: Forbidden
168
+ headers:
169
+ Content-Length:
170
+ - '14'
171
+ Content-Type:
172
+ - application/json; charset=UTF-8
173
+ Cache-Control:
174
+ - no-cache
175
+ Pragma:
176
+ - no-cache
177
+ X-Frame-Options:
178
+ - SAMEORIGIN
179
+ X-Content-Type-Options:
180
+ - nosniff
181
+ X-Xss-Protection:
182
+ - 1; mode=block
183
+ Server:
184
+ - '''; DROP TABLE servertypes; --'
185
+ Date:
186
+ - Wed, 29 Jan 2014 23:31:49 GMT
187
+ Connection:
188
+ - keep-alive
189
+ body:
190
+ encoding: UTF-8
191
+ string: '{"error": 403}'
192
+ http_version:
193
+ recorded_at: Wed, 29 Jan 2014 23:30:35 GMT
194
+ 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
@@ -33,16 +33,63 @@ http_interactions:
33
33
  X-Frame-Options:
34
34
  - DENY
35
35
  Server:
36
- - "'; DROP TABLE servertypes; --"
36
+ - '''; DROP TABLE servertypes; --'
37
37
  Date:
38
38
  - Sun, 10 Nov 2013 22:21:39 GMT
39
39
  Connection:
40
40
  - keep-alive
41
41
  body:
42
42
  encoding: UTF-8
43
- string: "{\"kind\": \"UserList\", \"data\": {\"children\": [{\"mod_permissions\":
44
- [\"all\"], \"name\": \"samsymons\", \"id\": \"t2_614hc\"}, {\"mod_permissions\":
45
- [\"all\"], \"name\": \"<REDDIT_USERNAME>\", \"id\": \"t2_c3szt\"}]}}"
43
+ string: '{"kind": "UserList", "data": {"children": [{"mod_permissions": ["all"],
44
+ "name": "samsymons", "id": "t2_614hc"}, {"mod_permissions": ["all"], "name":
45
+ "<REDDIT_USERNAME>", "id": "t2_c3szt"}]}}'
46
46
  http_version:
47
47
  recorded_at: Sun, 10 Nov 2013 22:21:38 GMT
48
- recorded_with: VCR 2.6.0
48
+ - request:
49
+ method: get
50
+ uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/about/moderators.json
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ''
54
+ headers:
55
+ User-Agent:
56
+ - Faraday v0.8.8
57
+ Cookie:
58
+ - reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
59
+ X-Modhash:
60
+ - 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
61
+ Accept-Encoding:
62
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
+ Accept:
64
+ - '*/*'
65
+ response:
66
+ status:
67
+ code: 403
68
+ message: Forbidden
69
+ headers:
70
+ Content-Length:
71
+ - '14'
72
+ Content-Type:
73
+ - application/json; charset=UTF-8
74
+ Cache-Control:
75
+ - no-cache
76
+ Pragma:
77
+ - no-cache
78
+ X-Frame-Options:
79
+ - SAMEORIGIN
80
+ X-Content-Type-Options:
81
+ - nosniff
82
+ X-Xss-Protection:
83
+ - 1; mode=block
84
+ Server:
85
+ - '''; DROP TABLE servertypes; --'
86
+ Date:
87
+ - Wed, 29 Jan 2014 23:31:49 GMT
88
+ Connection:
89
+ - keep-alive
90
+ body:
91
+ encoding: UTF-8
92
+ string: '{"error": 403}'
93
+ http_version:
94
+ recorded_at: Wed, 29 Jan 2014 23:30:34 GMT
95
+ 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,71 @@ 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:34 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:33 GMT
54
- recorded_with: VCR 2.6.0
54
+ - request:
55
+ method: get
56
+ uri: http://www.reddit.com/r/<REDDIT_USERNAME>_testsub/about.json
57
+ body:
58
+ encoding: US-ASCII
59
+ string: ''
60
+ headers:
61
+ User-Agent:
62
+ - Faraday v0.8.8
63
+ Cookie:
64
+ - reddit_session=20332937,2013-11-10T11:35:59,2077074c26ccd8ec123c996b77eeb7afb6090af9
65
+ X-Modhash:
66
+ - 36zuxndsdf695692a68e32384990478663dadfc30f0a1dd959
67
+ Accept-Encoding:
68
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
69
+ Accept:
70
+ - '*/*'
71
+ response:
72
+ status:
73
+ code: 403
74
+ message: Forbidden
75
+ headers:
76
+ Content-Length:
77
+ - '14'
78
+ Content-Type:
79
+ - application/json; charset=UTF-8
80
+ Cache-Control:
81
+ - no-cache
82
+ Pragma:
83
+ - no-cache
84
+ X-Frame-Options:
85
+ - SAMEORIGIN
86
+ X-Content-Type-Options:
87
+ - nosniff
88
+ X-Xss-Protection:
89
+ - 1; mode=block
90
+ Server:
91
+ - '''; DROP TABLE servertypes; --'
92
+ Date:
93
+ - Wed, 29 Jan 2014 23:31:48 GMT
94
+ Connection:
95
+ - keep-alive
96
+ body:
97
+ encoding: UTF-8
98
+ string: '{"error": 403}'
99
+ http_version:
100
+ recorded_at: Wed, 29 Jan 2014 23:30:33 GMT
101
+ recorded_with: VCR 2.8.0