Module: Shikimori::API::V1::Appear
- Included in:
- Shikimori::API::V1
- Defined in:
- lib/shikimori/api/v1/appear.rb
Overview
Methods for the Appears API
Instance Method Summary collapse
-
#create_appear(comment_ids: [], topic_ids: [], headers: nil, **query) ⇒ Boolean
Mark comments or topics as read.
Instance Method Details
#create_appear(comment_ids: [], topic_ids: [], headers: nil, **query) ⇒ Boolean
Mark comments or topics as read
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/shikimori/api/v1/appear.rb', line 27 def create_appear(comment_ids: [], topic_ids: [], headers: nil, **query) comments = comment_ids.map { "comment-#{_1}" } topics = topic_ids.map { "topic-#{_1}" } ids = comments + topics rest.post base_url.join('appear').url, { ids: ids.join(',') }, headers: headers, query: query true end |