Module: WordpressApi::Api::Reader
- Included in:
- Client
- Defined in:
- lib/wordpress_api/api/reader.rb
Instance Method Summary collapse
- #blog(blog_id, options = {}) ⇒ Object
- #comments(blog_id, post_id, options = {}) ⇒ Object
- #followers(blog_id, options = {}) ⇒ Object
- #likes(blog_id, post_id, options = {}) ⇒ Object
- #posts(blog_id, options = {}) ⇒ Object
- #profile(options = {}) ⇒ Object
Instance Method Details
#blog(blog_id, options = {}) ⇒ Object
11 12 13 14 |
# File 'lib/wordpress_api/api/reader.rb', line 11 def blog(blog_id, ={}) path = "/sites/#{blog_id}" Mash.from_json(get path, ) end |
#comments(blog_id, post_id, options = {}) ⇒ Object
26 27 28 29 |
# File 'lib/wordpress_api/api/reader.rb', line 26 def comments(blog_id, post_id, ={}) path = "/sites/#{blog_id}/posts/#{post_id}/replies" Mash.from_json(get path, ) end |
#followers(blog_id, options = {}) ⇒ Object
31 32 33 34 |
# File 'lib/wordpress_api/api/reader.rb', line 31 def followers(blog_id, ={}) path = "/sites/#{blog_id}/follows/mine" Mash.from_json(get path, ) end |
#likes(blog_id, post_id, options = {}) ⇒ Object
21 22 23 24 |
# File 'lib/wordpress_api/api/reader.rb', line 21 def likes(blog_id, post_id, ={}) path = "/sites/#{blog_id}/posts/#{post_id}/likes" Mash.from_json(get path, ) end |