Module: Shikimori::API::V1::Reviews
- Included in:
- Shikimori::API::V1
- Defined in:
- lib/shikimori/api/v1/reviews.rb
Overview
Methods for the Reviews API
Instance Method Summary collapse
-
#create_review(review, frontend: nil, headers: nil, **query) ⇒ Hash
Create a anime’s review.
-
#delete_review(id, headers: nil, **query) ⇒ Boolean
Delete anime’s review.
-
#update_review(id, review, frontend: nil, headers: nil, **query) ⇒ Hash
Update anime’s review by id.
Instance Method Details
#create_review(review, frontend: nil, headers: nil, **query) ⇒ Hash
Create a anime’s review
30 31 32 33 34 35 36 |
# File 'lib/shikimori/api/v1/reviews.rb', line 30 def create_review(review, frontend: nil, headers: nil, **query) rest.post( base_url.join('reviews').url, { review: review, frontend: frontend }.compact, headers: headers, query: query ) end |
#delete_review(id, headers: nil, **query) ⇒ Boolean
Delete anime’s review
83 84 85 |
# File 'lib/shikimori/api/v1/reviews.rb', line 83 def delete_review(id, headers: nil, **query) rest.delete base_url.join('reviews', id.to_s).url, headers: headers, query: query end |
#update_review(id, review, frontend: nil, headers: nil, **query) ⇒ Hash
Update anime’s review by id
59 60 61 62 63 64 65 |
# File 'lib/shikimori/api/v1/reviews.rb', line 59 def update_review(id, review, frontend: nil, headers: nil, **query) rest.put( base_url.join('reviews', id.to_s).url, { review: review, frontend: frontend }.compact, headers: headers, query: query ) end |