redd 0.8.8 → 0.9.0.pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -1
  3. data/CONTRIBUTING.md +63 -0
  4. data/Guardfile +7 -0
  5. data/README.md +6 -5
  6. data/Rakefile +1 -1
  7. data/TODO.md +423 -0
  8. data/bin/console +91 -77
  9. data/bin/guard +2 -0
  10. data/lib/redd.rb +7 -5
  11. data/lib/redd/api_client.rb +2 -3
  12. data/lib/redd/auth_strategies/auth_strategy.rb +7 -2
  13. data/lib/redd/auth_strategies/script.rb +7 -0
  14. data/lib/redd/auth_strategies/userless.rb +7 -0
  15. data/lib/redd/auth_strategies/web.rb +6 -1
  16. data/lib/redd/client.rb +0 -3
  17. data/lib/redd/errors.rb +56 -0
  18. data/lib/redd/middleware.rb +10 -8
  19. data/lib/redd/models/access.rb +30 -18
  20. data/lib/redd/models/comment.rb +185 -27
  21. data/lib/redd/models/front_page.rb +16 -36
  22. data/lib/redd/models/gildable.rb +1 -1
  23. data/lib/redd/models/inboxable.rb +13 -3
  24. data/lib/redd/models/listing.rb +27 -6
  25. data/lib/redd/models/live_thread.rb +76 -23
  26. data/lib/redd/models/live_update.rb +46 -0
  27. data/lib/redd/models/messageable.rb +1 -1
  28. data/lib/redd/models/mod_action.rb +59 -0
  29. data/lib/redd/models/model.rb +23 -0
  30. data/lib/redd/models/moderatable.rb +6 -6
  31. data/lib/redd/models/modmail.rb +61 -0
  32. data/lib/redd/models/modmail_conversation.rb +154 -0
  33. data/lib/redd/models/modmail_message.rb +35 -0
  34. data/lib/redd/models/more_comments.rb +29 -5
  35. data/lib/redd/models/multireddit.rb +63 -20
  36. data/lib/redd/models/paginated_listing.rb +113 -0
  37. data/lib/redd/models/postable.rb +11 -13
  38. data/lib/redd/models/private_message.rb +78 -11
  39. data/lib/redd/models/replyable.rb +2 -2
  40. data/lib/redd/models/reportable.rb +14 -0
  41. data/lib/redd/models/searchable.rb +2 -2
  42. data/lib/redd/models/self.rb +17 -0
  43. data/lib/redd/models/session.rb +75 -31
  44. data/lib/redd/models/submission.rb +309 -56
  45. data/lib/redd/models/subreddit.rb +330 -103
  46. data/lib/redd/models/trophy.rb +34 -0
  47. data/lib/redd/models/user.rb +185 -46
  48. data/lib/redd/models/wiki_page.rb +37 -16
  49. data/lib/redd/utilities/error_handler.rb +13 -13
  50. data/lib/redd/utilities/unmarshaller.rb +7 -5
  51. data/lib/redd/version.rb +1 -1
  52. data/redd.gemspec +18 -15
  53. metadata +82 -16
  54. data/lib/redd/error.rb +0 -53
  55. data/lib/redd/models/basic_model.rb +0 -80
  56. data/lib/redd/models/lazy_model.rb +0 -75
  57. data/lib/redd/models/mod_mail.rb +0 -142
  58. data/lib/redd/utilities/stream.rb +0 -61
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d009c1ad3efb5faf6e46155a0c8dbd643762c2d
4
- data.tar.gz: 0f3d80e834eb5294de32c59838a1f896ff0ab354
3
+ metadata.gz: 2390ae91194cc27f480a767e8d3c6aeaf8f4d649
4
+ data.tar.gz: ff8f69a3280a4403094fb6f5836167a6810704df
5
5
  SHA512:
6
- metadata.gz: b7d188f6d4cedb9f286bea9f9b9d1a38f5cd5f5c2151f2600737abf5f8c5e49634e59f14965f96312cafcda8ae697f130cb4f942183085360bda23bc2597636f
7
- data.tar.gz: 0e764013df9c65079f807200721649474f4eb2e51d87c2aee62180f0d285c22d9b5d69e5345b1cead59a2fe979aeaf6befb0a2d8e082253dfcb509c5877b6099
6
+ metadata.gz: 24cb20848f3d9c6b863b6b37f91b44380dca1eeacbfd1387568ee4b745e85e3e6e87c960a8cdd43e41a6ce821ab0a31fa68447629aa58d33656c86bce7959dfd
7
+ data.tar.gz: d3ece323ea83e671ea7f618fad231a29fbf9ba50b5cb1fdf138f49636907280fe8b9b726c41fb10acdb07830f50253f56269a6b13d713149edba06cffe2d2f86
@@ -1,9 +1,12 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.3
2
+ TargetRubyVersion: 2.1
3
3
 
4
4
  Metrics/LineLength:
5
5
  Max: 100
6
6
 
7
+ Style/MutableConstant:
8
+ Enabled: false
9
+
7
10
  # Dumb, but also brand new.
8
11
  Style/NumericPredicate:
9
12
  Enabled: false
@@ -0,0 +1,63 @@
1
+ # Contributing
2
+
3
+ This is the documentation that contains information on contributing to Redd.
4
+ Note that I would appreciate contributions to this document itself.
5
+
6
+ There isn't an official code of conduct, just
7
+ [don't be a dick](https://twitter.com/wilw/status/5966220832).
8
+
9
+ ### Filing an Issue / Making a Pull Request
10
+
11
+ **The quickest way to get a feature into Redd is by raising an issue.**
12
+
13
+ Please try to provide as much information as possible when submitting an
14
+ issue. I'm not going to get mad if the issue is inconsequential, so don't
15
+ hesitate to ask even simple questions about the gem.
16
+
17
+ When making a pull request, you don't really have to write tests for the
18
+ time being (what a relief for you!). Just make sure you have manually tested
19
+ the call yourself and rubocop doesn't whine about it too much.
20
+
21
+ ### Architecture
22
+ The central part of the gem is the `Client`. It knows how to make HTTP
23
+ requests. For specific reddit behaviour, there is a subclass named
24
+ `APIClient`. Keep in mind that neither of these are actually aware of the API
25
+ methods, just how to interact with the API.
26
+
27
+ To simplify the architecture as much as humanly possible, everything is
28
+ represented as a model. A model holds a client and some attributes. It has
29
+ some methods that make API requests using the client and maybe some of its
30
+ attributes.
31
+
32
+ Each authentication method has an `AuthStrategy` associated with it. This only
33
+ provides API keys and is aware of the OAuth2 protocol.
34
+
35
+ The `Redd.it` method combines all of these:
36
+
37
+ 1. It creates an `AuthStrategy`.
38
+ 2. It creates an `APIClient` using the `AuthStrategy`.
39
+ 3. It creates a `Session` model using the `APIClient`.
40
+ 4. It returns the created `Session`.
41
+
42
+ This seems complicated but trust me on this, this gem has gone through three
43
+ rewrites.
44
+
45
+ ### Reddit API
46
+
47
+ Here are some links where you can find helpful information about the reddit
48
+ API:
49
+
50
+ 1. [API reference](https://www.reddit.com/dev/api)
51
+ 2. [GitHub Wiki](https://github.com/reddit/reddit/wiki/API)
52
+ 3. [API Subreddit](https://www.reddit.com/r/redditdev)
53
+
54
+ ### Testing
55
+
56
+ Unit testing has turned out to be ultimately pointless; the API is a total
57
+ mess and requires a deep knowledge of how reddit works. Testing the multitude
58
+ of parameters that each call takes, it's safe to assume individual unit tests
59
+ will span a few thousand lines and be incredibly brittle. So when you submit a
60
+ pull-request, I expect you to have *manually tested the calls yourself*.
61
+
62
+ To help you, there is a console that can be found at `./bin/console`. Give it
63
+ a shot — I think you'll love it!
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ guard :rspec, cmd: 'bundle exec rspec -fp' do
4
+ watch(%r{^spec/.+_spec\.rb$})
5
+ watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
6
+ watch('spec/spec_helper.rb') { 'spec' }
7
+ end
data/README.md CHANGED
@@ -31,6 +31,8 @@
31
31
 
32
32
  ### Demo
33
33
 
34
+ #### Reddit Bot
35
+
34
36
  ```ruby
35
37
  require 'redd'
36
38
 
@@ -42,7 +44,7 @@ session = Redd.it(
42
44
  password: 'hunter2'
43
45
  )
44
46
 
45
- session.subreddit('all').comment_stream do |comment|
47
+ session.subreddit('all').comments.stream do |comment|
46
48
  if comment.body.include?('roll a dice')
47
49
  comment.reply("It's a #{rand(1..6)}!")
48
50
  elsif comment.body.include?('flip a coin')
@@ -51,6 +53,8 @@ session.subreddit('all').comment_stream do |comment|
51
53
  end
52
54
  ```
53
55
 
56
+ #### Web Application
57
+
54
58
  ```ruby
55
59
  require 'sinatra'
56
60
  require 'redd/middleware'
@@ -98,10 +102,7 @@ end
98
102
  Check out the [**official subreddit**](https://www.reddit.com/r/Redd) or raise a [**GitHub issue**](https://github.com/avinashbot/redd/issues/new).
99
103
 
100
104
  #### How do I request a feature / contribute?
101
-
102
- - The quickest way to get a feature into Redd is to raise a [**GitHub issue**](https://github.com/avinashbot/redd/issues/new).
103
- - Pull requests are also appreciated!
104
- - Don't hesitate! There are no stupid questions!
105
+ Take a look at [**CONTRIBUTING.md**](https://github.com/avinashbot/redd/blob/master/CONTRIBUTING.md).
105
106
 
106
107
  #### How can I contact you?
107
108
  [Reddit](https://www.reddit.com/message/compose/?to=Mustermind) /
data/Rakefile CHANGED
@@ -9,4 +9,4 @@ RuboCop::RakeTask.new do |t|
9
9
  end
10
10
  RSpec::Core::RakeTask.new(:spec)
11
11
 
12
- task default: [:rubocop, :spec]
12
+ task default: %i[rubocop spec]
data/TODO.md ADDED
@@ -0,0 +1,423 @@
1
+ # TODO
2
+
3
+ This page contains all the calls from the reddit api along with their
4
+ implementations in Redd. The API docs are located
5
+ [**here**](https://www.reddit.com/dev/api).
6
+
7
+ ## Account
8
+
9
+ - **GET /api/v1/me**
10
+ - **Implemented**: [Redd::Models::Session#me](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#me-instance_method)
11
+ - **GET /api/v1/me/karma**
12
+ - **Implemented**: [Redd::Models::Session#karma_breakdown](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#karma_breakdown-instance_method)
13
+ - **GET /api/v1/me/prefs**
14
+ - **Implemented**: [Redd::Models::Session#my_preferences](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#my_preferences-instance_method)
15
+ - **PATCH /api/v1/me/prefs**
16
+ - **Implemented**: [Redd::Models::Session#edit_preferences](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#edit_preferences-instance_method)
17
+ - **GET /api/v1/me/trophies**
18
+ - **Won't Implement**: Already implemented for User.
19
+ - **GET /prefs/where**
20
+ - **Partially Implemented**: [Redd::Models::Session](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session) (for friends, blocked, and trusted)
21
+
22
+ ## Captcha
23
+
24
+ - **GET /api/needs_captcha**
25
+ - **Won't Implement**: Not necessary for OAuth2 clients
26
+
27
+ ## Flair
28
+
29
+ - **POST [/r/subreddit]/api/clearflairtemplates**
30
+ - **Not Implemented**
31
+ - **POST [/r/subreddit]/api/deleteflair**
32
+ - **Implemented**: [Redd::Models::Subreddit#delete_flair](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#delete_flair-instance_method)
33
+ - **POST [/r/subreddit]/api/deleteflairtemplate**
34
+ - **Not Implemented**
35
+ - **POST [/r/subreddit]/api/flair**
36
+ - **Implemented**: [Redd::Models::Subreddit#set_flair](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#set_flair-instance_method)
37
+ - **POST [/r/subreddit]/api/flairconfig**
38
+ - **Not Implemented**
39
+ - **POST [/r/subreddit]/api/flaircsv**
40
+ - **Not Implemented**
41
+ - **GET [/r/subreddit]/api/flairlist**
42
+ - **Implemented**: [Redd::Models::Subreddit#flair_listing](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#flair_listing-instance_method)
43
+ - **POST [/r/subreddit]/api/flairselector**
44
+ - **Not Implemented**
45
+ - **POST [/r/subreddit]/api/flairtemplate**
46
+ - **Not Implemented**
47
+ - **GET [/r/subreddit]/api/link_flair**
48
+ - **Not Implemented**
49
+ - **POST [/r/subreddit]/api/selectflair**
50
+ - **Implemented**: [Redd::Models::Subreddit#set_flair_template](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#set_flair_template-instance_method)
51
+ - **POST [/r/subreddit]/api/setflairenabled**
52
+ - **Not Implemented**
53
+ - **GET [/r/subreddit]/api/user_flair**
54
+ - **Not Implemented**
55
+
56
+ ## Reddit Gold
57
+
58
+ - **POST /api/v1/gold/gild/fullname**
59
+ - **Implemented**: [Redd::Models::Gildable#gild](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Gildable#gild-instance_method)
60
+ - **POST /api/v1/gold/give/username**
61
+ - **Implemented**: [Redd::Models::User#gift_gold](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/User#gift_gold-instance_method)
62
+
63
+ ## Links & Comments
64
+
65
+ - **POST /api/comment**
66
+ - **Implemented**: [Redd::Models::Replyable#reply](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Replyable#reply-instance_method)
67
+ - **POST /api/del**
68
+ - **Implemented**: [Redd::Models::Postable#delete](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#delete-instance_method)
69
+ - **POST /api/editusertext**
70
+ - **Implemented**: [Redd::Models::Postable#edit](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#edit-instance_method)
71
+ - **POST /api/hide**
72
+ - **Implemented**: [Redd::Models::Postable#hide](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#hide-instance_method)
73
+ - **GET [/r/subreddit]/api/info**
74
+ - **Implemented**
75
+ - [Redd::Models::Session#from_fullnames](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#from_fullnames-instance_method)
76
+ - Also implemented as part of lazy loaders.
77
+ - **POST /api/lock**
78
+ - **Implemented**: [Redd::Models::Submission#lock](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#lock-instance_method)
79
+ - **POST /api/marknsfw**
80
+ - **Implemented**: [Redd::Models::Submission#mark_as_nsfw](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#mark_as_nsfw-instance_method)
81
+ - **GET /api/morechildren**
82
+ - TODO: add implementation/documentation link
83
+ - **POST /api/report**
84
+ - **Implemented**: [Redd::Models::Reportable#report](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Reportable#report-instance_method)
85
+ - **POST /api/save**
86
+ - **Implemented**: [Redd::Models::Postable#save](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#save-instance_method)
87
+ - **GET /api/saved_categories**
88
+ - **Implemented**: [Redd::Models::Session#saved_categories](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#saved_categories-instance_method)
89
+ - **POST /api/sendreplies**
90
+ - **Implemented**: [Redd::Models::Postable#enable_inbox_replies](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#enable_inbox_replies-instance_method)
91
+ - **POST /api/set_contest_mode**
92
+ - **Implemented**: [Redd::Models::Submission#enable_contest_mode](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#enable_contest_mode-instance_method)
93
+ - **POST /api/set_subreddit_sticky**
94
+ - **Implemented**: [Redd::Models::Submission#make_sticky](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#make_sticky-instance_method)
95
+ - **POST /api/set_suggested_sort**
96
+ - **Implemented**: [Redd::Models::Submission#set_suggested_sort](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#set_suggested_sort-instance_method)
97
+ - **POST /api/spoiler**
98
+ - **Implemented**: [Redd::Models::Submission#mark_as_spoiler](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#mark_as_spoiler-instance_method)
99
+ - **POST /api/store_visits**
100
+ - **Not Implemented**
101
+ - **POST /api/submit**
102
+ - **Implemented**: [Redd::Models::Subreddit#submit](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#submit-instance_method)
103
+ - **POST /api/unhide**
104
+ - **Implemented**: [Redd::Models::Postable#unhide](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#unhide-instance_method)
105
+ - **POST /api/unlock**
106
+ - **Implemented**: [Redd::Models::Submission#unlock](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#unlock-instance_method)
107
+ - **POST /api/unmarknsfw**
108
+ - **Implemented**: [Redd::Models::Submission#unmark_as_nsfw](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#unmark_as_nsfw-instance_method)
109
+ - **POST /api/unsave**
110
+ - **Implemented**: [Redd::Models::Postable#unsave](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#unsave-instance_method)
111
+ - **POST /api/unspoiler**
112
+ - **Implemented**: [Redd::Models::Submission#unmark_as_spoiler](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#unmark_as_spoiler-instance_method)
113
+ - **POST /api/vote**
114
+ - **Implemented**:
115
+ - [Redd::Models::Postable#upvote](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#upvote-instance_method)
116
+ - [Redd::Models::Postable#downvote](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#downvote-instance_method)
117
+ - [Redd::Models::Postable#undo_vote](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Postable#undo_vote-instance_method)
118
+
119
+ ## Listings
120
+
121
+ - **GET /api/trending_subreddits**
122
+ - **Implemented**: [Redd::Models::Session#trending_subreddits](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#trending_subreddits-instance_method)
123
+ - **GET /by_id/names**
124
+ - **Not Implemented**: See `/api/info`.
125
+ - **GET [/r/subreddit]/comments/article**
126
+ - **Implemented**: Part of lazy-loading in Submission and Comment.
127
+ - **GET /duplicates/article**
128
+ - **Implemented**: [Redd::Models::Submission#duplicates](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#duplicates-instance_method)
129
+ - **GET [/r/subreddit]/hot**
130
+ - **Implemented**: [Redd::Models::FrontPage#hot](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/FrontPage#hot-instance_method)
131
+ - **Implemented**: [Redd::Models::Submission#hot](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#hot-instance_method)
132
+ - **GET [/r/subreddit]/new**
133
+ - **Implemented**: [Redd::Models::FrontPage#new](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/FrontPage#new-instance_method)
134
+ - **Implemented**: [Redd::Models::Submission#new](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#new-instance_method)
135
+ - **GET [/r/subreddit]/random**
136
+ - **Implemented**: [Redd::Models::FrontPage#random](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/FrontPage#random-instance_method)
137
+ - **Implemented**: [Redd::Models::Submission#random](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#random-instance_method)
138
+ - **GET [/r/subreddit]/rising**
139
+ - **Implemented**: [Redd::Models::FrontPage#rising](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/FrontPage#rising-instance_method)
140
+ - **Implemented**: [Redd::Models::Submission#rising](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#rising-instance_method)
141
+ - **GET [/r/subreddit]/sort**
142
+ - **Implemented**: [Redd::Models::FrontPage#listing](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/FrontPage#listing-instance_method)
143
+ - **Implemented**: [Redd::Models::Submission#listing](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Submission#listing-instance_method)
144
+
145
+ ## Live Threads
146
+
147
+ - **GET /api/live/by_id/names**
148
+ - **Not Implemented**
149
+ - **POST /api/live/create**
150
+ - **Not Implemented**
151
+ - **GET /api/live/happening_now**
152
+ - **Not Implemented**
153
+ - **POST /api/live/thread/accept_contributor_invite**
154
+ - **Not Implemented**
155
+ - **POST /api/live/thread/close_thread**
156
+ - **Not Implemented**
157
+ - **POST /api/live/thread/delete_update**
158
+ - **Implemented**: [Redd::Models::LiveThread#delete_update](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/LiveThread#delete_update-instance_method)
159
+ - **POST /api/live/thread/edit**
160
+ - **Implemented**: [Redd::Models::LiveThread#configure](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/LiveThread#configure-instance_method)
161
+ - **POST /api/live/thread/invite_contributor**
162
+ - **Not Implemented**
163
+ - **POST /api/live/thread/leave_contributor**
164
+ - **Not Implemented**
165
+ - **POST /api/live/thread/report**
166
+ - **Not Implemented**
167
+ - **POST /api/live/thread/rm_contributor**
168
+ - **Not Implemented**
169
+ - **POST /api/live/thread/rm_contributor_invite**
170
+ - **Not Implemented**
171
+ - **POST /api/live/thread/set_contributor_permissions**
172
+ - **Not Implemented**
173
+ - **POST /api/live/thread/strike_update**
174
+ - **Implemented**: [Redd::Models::LiveThread#strike_update](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/LiveThread#strike_update-instance_method)
175
+ - **POST /api/live/thread/update**
176
+ - **Implemented**: [Redd::Models::LiveThread#update](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/LiveThread#update-instance_method)
177
+ - **GET /live/thread**
178
+ - **Implemented**: [Redd::Models::LiveThread#updates](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/LiveThread#updates-instance_method)
179
+ - **GET /live/thread/about**
180
+ - **Implemented**: [Redd::Models::Session#live_thread](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#live_thread-instance_method)
181
+ - **GET /live/thread/contributors**
182
+ - **Implemented**: [Redd::Models::LiveThread#contributors](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/LiveThread#contributors-instance_method)
183
+ - **GET /live/thread/discussions**
184
+ - **Implemented**: [Redd::Models::LiveThread#discussions](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/LiveThread#discussions-instance_method)
185
+
186
+ ## Private Messages
187
+
188
+ - **POST /api/block**
189
+ - **Implemented**: [Redd::Models::Inboxable#block](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Inboxable#block-instance_method)
190
+ - **POST /api/collapse_message**
191
+ - **Implemented**: [Redd::Models::Inboxable#collapse](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Inboxable#collapse-instance_method)
192
+ - **POST /api/compose**
193
+ - **Implemented**: [Redd::Models::Messageable#send_message](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Messageable#send_message-instance_method)
194
+ - **POST /api/del_msg**
195
+ - **Implemented**: [Redd::Models::PrivateMessage#delete](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/PrivateMessage#delete-instance_method)
196
+ - **POST /api/read_all_messages**
197
+ - **Implemented**: [Redd::Models::Session#read_all_messages](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#read_all_messages-instance_method)
198
+ - **POST /api/read_message**
199
+ - **Implemented**: [Redd::Models::Inboxable#mark_as_read](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Inboxable#mark_as_read-instance_method)
200
+ - **POST /api/unblock_subreddit**
201
+ - **Not Implemented**
202
+ - **POST /api/uncollapse_message**
203
+ - **Implemented**: [Redd::Models::Inboxable#uncollapse](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Inboxable#uncollapse-instance_method)
204
+ - **POST /api/unread_message**
205
+ - **Implemented**: [Redd::Models::Inboxable#mark_as_unread](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Inboxable#mark_as_unread-instance_method)
206
+ - **GET /message/where**
207
+ - **Implemented**: [Redd::Models::Session#my_messages](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#my_messages-instance_method)
208
+
209
+ ## Miscellaneous
210
+
211
+ - **GET /api/v1/scopes**
212
+ - **Not Implemented**
213
+
214
+ ## Moderation
215
+
216
+ - **GET [/r/subreddit]/about/log**
217
+ - **Implemented**: [Redd::Models::Subreddit#mod_log](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#mod_log-instance_method)
218
+ - **GET [/r/subreddit]/about/location**
219
+ - **Implemented**: [Redd::Models::Subreddit#moderator_listing](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#moderator_listing-instance_method)
220
+ - **POST [/r/subreddit]/api/accept_moderator_invite**
221
+ - **Implemented**: [Redd::Models::Subreddit#accept_moderator_invite](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#accept_moderator_invite-instance_method)
222
+ - **POST /api/approve**
223
+ - **Implemented**: [Redd::Models::Moderatable#approve](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Moderatable#approve-instance_method)
224
+ - **POST /api/distinguish**
225
+ - **Implemented**: [Redd::Models::Moderatable#distinguish](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Moderatable#distinguish-instance_method)
226
+ - **POST /api/ignore_reports**
227
+ - **Implemented**: [Redd::Models::Moderatable#ignore_reports](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Moderatable#ignore_reports-instance_method)
228
+ - **POST /api/leavecontributor**
229
+ - **Implemented**: [Redd::Models::Subreddit#leave_contributor](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#leave_contributor-instance_method)
230
+ - **POST /api/leavemoderator**
231
+ - **Implemented**: [Redd::Models::Subreddit#leave_moderator](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#leave_moderator-instance_method)
232
+ - **POST /api/mute_message_author**
233
+ - **Implemented**: [Redd::Models::PrivateMessage#mute_author](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/PrivateMessage#mute_author-instance_method)
234
+ - **POST /api/remove**
235
+ - **Implemented**: [Redd::Models::Moderatable#remove](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Moderatable#remove-instance_method)
236
+ - **POST /api/unignore_reports**
237
+ - **Implemented**: [Redd::Models::Moderatable#unignore_reports](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Moderatable#unignore_reports-instance_method)
238
+ - **POST /api/unmute_message_author**
239
+ - **Implemented**: [Redd::Models::PrivateMessage#unmute_author](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/PrivateMessage#unmute_author-instance_method)
240
+ - **GET [/r/subreddit]/stylesheet**
241
+ - **Implemented**: [Redd::Models::Subreddit#stylesheet](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#stylesheet-instance_method)
242
+
243
+ ## New Modmail
244
+
245
+ - **POST /api/mod/bulk_read**
246
+ - **Not Implemented**
247
+ - **GET /api/mod/conversations**
248
+ - **Implemented**: [Redd::Models::Modmail#conversations](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Modmail#conversations-instance_method)
249
+ - **POST /api/mod/conversations**
250
+ - **Implemented**: [Redd::Models::Modmail#create](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Modmail#create-instance_method)
251
+ - **GET /api/mod/conversations/:conversation_id**
252
+ - **Implemented**: [Redd::Models::Modmail#get](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Modmail#get-instance_method)
253
+ - **POST /api/mod/conversations/:conversation_id**
254
+ - **Implemented**: [Redd::Models::ModmailConversation#reply](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/ModmailConversation#reply-instance_method)
255
+ - **POST /api/mod/conversations/:conversation_id/archive**
256
+ - **Implemented**: [Redd::Models::ModmailConversation#archive](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/ModmailConversation#archive-instance_method)
257
+ - **DELETE /api/mod/conversations/:conversation_id/highlight**
258
+ - **Implemented**: [Redd::Models::ModmailConversation#unhighlight](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/ModmailConversation#unhighlight-instance_method)
259
+ - **POST /api/mod/conversations/:conversation_id/highlight**
260
+ - **Implemented**: [Redd::Models::ModmailConversation#highlight](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/ModmailConversation#highlight-instance_method)
261
+ - **POST /api/mod/conversations/:conversation_id/mute**
262
+ - **Implemented**: [Redd::Models::ModmailConversation#mute](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/ModmailConversation#mute-instance_method)
263
+ - **POST /api/mod/conversations/:conversation_id/unarchive**
264
+ - **Implemented**: [Redd::Models::ModmailConversation#unarchive](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/ModmailConversation#unarchive-instance_method)
265
+ - **POST /api/mod/conversations/:conversation_id/unmute**
266
+ - **Implemented**: [Redd::Models::ModmailConversation#unmute](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/ModmailConversation#unmute-instance_method)
267
+ - **GET /api/mod/conversations/:conversation_id/user**
268
+ - **Not Implemented**
269
+ - **POST /api/mod/conversations/read**
270
+ - **Partially Implemented**: [Redd::Models::ModmailConversation#mark_as_read](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/ModmailConversation#mark_as_read-instance_method)
271
+ - Bulk read not implemented
272
+ - **GET /api/mod/conversations/subreddits**
273
+ - **Implemented**: [Redd::Models::Modmail#enrolled](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Modmail#enrolled-instance_method)
274
+ - **POST /api/mod/conversations/unread**
275
+ - **Partially Implemented**: [Redd::Models::ModmailConversation#mark_as_unread](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/ModmailConversation#mark_as_unread-instance_method)
276
+ - Bulk unread not implemented
277
+ - **GET /api/mod/conversations/unread/count**
278
+ - **Implemented**: [Redd::Models::Modmail#unread_count](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Modmail#unread_count-instance_method)
279
+
280
+ ## Multis
281
+
282
+ - **POST /api/multi/copy**
283
+ - **Not Implemented**
284
+ - **GET /api/multi/mine**
285
+ - **Not Implemented**
286
+ - **POST /api/multi/rename**
287
+ - **Not Implemented**
288
+ - **GET /api/multi/user/username**
289
+ - **Not Implemented**
290
+ - **DELETE /api/multi/multipath**
291
+ - **Not Implemented**
292
+ - **GET /api/multi/multipath**
293
+ - **Implemented**: [Redd::Models::Session#multi](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#multi-instance_method)
294
+ - **POST /api/multi/multipath**
295
+ - **Not Implemented**
296
+ - **PUT /api/multi/multipath**
297
+ - **Not Implemented**
298
+ - **GET /api/multi/multipath/description**
299
+ - **Not Implemented**
300
+ - **PUT /api/multi/multipath/description**
301
+ - **Not Implemented**
302
+ - **DELETE /api/multi/multipath/r/srname**
303
+ - **Not Implemented**
304
+ - **GET /api/multi/multipath/r/srname**
305
+ - **Not Implemented**
306
+ - **PUT /api/multi/multipath/r/srname**
307
+ - **Not Implemented**
308
+
309
+ ## Search
310
+
311
+ - **GET [/r/subreddit]/search**
312
+ - **Implemented**: [Redd::Models::Searchable#search](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Searchable#search-instance_method)
313
+
314
+ ## Subreddits
315
+
316
+ - **GET [/r/subreddit]/about/where**
317
+ - **Implemented**: [Redd::Models::Subreddit#relationship_listing](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#relationship_listing-instance_method)
318
+ - **POST [/r/subreddit]/api/delete_sr_banner**
319
+ - **Implemented**: [Redd::Models::Subreddit#delete_image](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#delete_image-instance_method)
320
+ - **POST [/r/subreddit]/api/delete_sr_header**
321
+ - **Implemented**: [Redd::Models::Subreddit#delete_image](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#delete_image-instance_method)
322
+ - **POST [/r/subreddit]/api/delete_sr_icon**
323
+ - **Implemented**: [Redd::Models::Subreddit#delete_image](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#delete_image-instance_method)
324
+ - **POST [/r/subreddit]/api/delete_sr_img**
325
+ - **Implemented**: [Redd::Models::Subreddit#delete_image](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#delete_image-instance_method)
326
+ - **GET /api/recommend/sr/srnames**
327
+ - **Not Implemented**
328
+ - **POST /api/search_reddit_names**
329
+ - **Not Implemented**
330
+ - **POST /api/search_subreddits**
331
+ - **Not Implemented**
332
+ - **POST /api/site_admin**
333
+ - **Implemented**: [Redd::Models::Subreddit#modify_settings](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#modify_settings-instance_method)
334
+ - **GET [/r/subreddit]/api/submit_text**
335
+ - **Won't Implement**: Already covered by the Subreddit model.
336
+ - **GET /api/subreddit_autocomplete**
337
+ - **Not Implemented**
338
+ - **POST [/r/subreddit]/api/subreddit_stylesheet**
339
+ - **Implemented**: [Redd::Models::Subreddit#update_stylesheet](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#update_stylesheet-instance_method)
340
+ - **GET /api/subreddits_by_topic**
341
+ - **Not Implemented**
342
+ - **POST /api/subscribe**
343
+ - **Implemented**: [Redd::Models::Subreddit#subscribe](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#subscribe-instance_method)
344
+ - **POST [/r/subreddit]/api/upload_sr_img**
345
+ - **Implemented**: [Redd::Models::Subreddit#upload_image](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#upload_image-instance_method)
346
+ - **GET /r/subreddit/about**
347
+ - **Implemented**: [Redd::Models::Session#subreddit](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#subreddit-instance_method)
348
+ - **GET /r/subreddit/about/edit**
349
+ - **Implemented**: [Redd::Models::Subreddit#settings](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#settings-instance_method)
350
+ - **GET /r/subreddit/about/rules**
351
+ - **Not Implemented**
352
+ - **GET /r/subreddit/about/traffic**
353
+ - **Not Implemented**
354
+ - **GET [/r/subreddit]/sidebar**
355
+ - **Won't Implement**: Already covered by Subreddit's "description" property.
356
+ - **GET [/r/subreddit]/sticky**
357
+ - **Not Implemented**
358
+ - **GET /subreddits/mine/where**
359
+ - **Implemented**: [Redd::Models::Session#my_subreddits](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#my_subreddits-instance_method)
360
+ - **GET /subreddits/search**
361
+ - **Not Implemented**
362
+ - **GET /subreddits/where**
363
+ - **Not Implemented**
364
+ - **GET /users/where**
365
+ - **Not Implemented**
366
+
367
+ ## Users
368
+
369
+ - **POST /api/block_user**
370
+ - **Implemented**: [Redd::Models::User#block](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/User#block-instance_method)
371
+ - **POST [/r/subreddit]/api/friend**
372
+ - **Implemented**: Used in multiple methods.
373
+ - **POST /api/report_user**
374
+ - **Not Implemented**
375
+ - **POST [/r/subreddit]/api/setpermissions**
376
+ - **Not Implemented**
377
+ - **POST [/r/subreddit]/api/unfriend**
378
+ - **Implemented**: Used in multiple methods.
379
+ - **GET /api/user_data_by_account_ids**
380
+ - **Not Implemented**: [Redd::Models::Session#from_fullnames](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#from_fullnames-instance_method)
381
+ - Currently commented out (will uncoment when adding cache check feature to lazy_lazer).
382
+ - Not implemented for batch calls, only individual.
383
+ - **GET /api/username_available**
384
+ - **Implemented**: [Redd::Models::Session#username_available?](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#username_available?-instance_method)
385
+ - **DELETE /api/v1/me/friends/username**
386
+ - **Implemented**: [Redd::Models::User#unfriend](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/User#unfriend-instance_method)
387
+ - **GET /api/v1/me/friends/username**
388
+ - TODO: add implementation/documentation link
389
+ - **PUT /api/v1/me/friends/username**
390
+ - **Implemented**: [Redd::Models::User#friend](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/User#friend-instance_method)
391
+ - **GET /api/v1/user/username/trophies**
392
+ - **Implemented**: [Redd::Models::User#trophies](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/User#trophies-instance_method)
393
+ - **GET /user/username/about**
394
+ - **Implemented**: [Redd::Models::Session#user](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session#user-instance_method)
395
+ - **GET /user/username/where**
396
+ - **Implemented**: [Redd::Models::User#listing](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/User#listing-instance_method)
397
+
398
+ ## Wiki
399
+
400
+ - **POST [/r/subreddit]/api/wiki/alloweditor/act**
401
+ - **Not Implemented**
402
+ - **POST [/r/subreddit]/api/wiki/edit**
403
+ - **Implemented**: [Redd::Models::WikiPage#edit](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/WikiPage#edit-instance_method)
404
+ - **POST [/r/subreddit]/api/wiki/hide**
405
+ - **Not Implemented**
406
+ - **POST [/r/subreddit]/api/wiki/revert**
407
+ - **Not Implemented**
408
+ - **GET [/r/subreddit]/wiki/discussions/page**
409
+ - **Not Implemented**
410
+ - **GET [/r/subreddit]/wiki/pages**
411
+ - **Implemented**: [Redd::Models::FrontPage#wiki_pages](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/FrontPage#wiki_pages-instance_method)
412
+ - **Implemented**: [Redd::Models::Subreddit#wiki_pages](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#wiki_pages-instance_method)
413
+ - **GET [/r/subreddit]/wiki/revisions**
414
+ - **Not Implemented**
415
+ - **GET [/r/subreddit]/wiki/revisions/page**
416
+ - **Not Implemented**
417
+ - **GET [/r/subreddit]/wiki/settings/page**
418
+ - **Not Implemented**
419
+ - **POST [/r/subreddit]/wiki/settings/page**
420
+ - **Not Implemented**
421
+ - **GET [/r/subreddit]/wiki/page**
422
+ - **Implemented**: [Redd::Models::FrontPage#wiki_page](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/FrontPage#wiki_page-instance_method)
423
+ - **Implemented**: [Redd::Models::Subreddit#wiki_page](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Subreddit#wiki_page-instance_method)