Module: Shikimori::API::V1::Dialogs
- Included in:
- Shikimori::API::V1
- Defined in:
- lib/shikimori/api/v1/dialogs.rb
Overview
Methods for the Dialogs API
Instance Method Summary collapse
-
#delete_dialog(username, headers: nil, **query) ⇒ Boolean
Delete Dialog.
-
#dialog(username, headers: nil, **query) ⇒ Hash
Get a dialog by username.
-
#dialogs(headers: nil, **query) ⇒ Array<Hash>
Get list of Dialogs.
Instance Method Details
#delete_dialog(username, headers: nil, **query) ⇒ Boolean
Delete Dialog. Requires ‘messages` oauth scope
72 73 74 |
# File 'lib/shikimori/api/v1/dialogs.rb', line 72 def delete_dialog(username, headers: nil, **query) rest.delete base_url.join('dialogs', username.to_s).url, headers: headers, query: query end |
#dialog(username, headers: nil, **query) ⇒ Hash
Get a dialog by username. Requires ‘messages` oauth scope
51 52 53 |
# File 'lib/shikimori/api/v1/dialogs.rb', line 51 def dialog(username, headers: nil, **query) rest.get base_url.join('dialogs', username.to_s).url, headers: headers, query: query end |
#dialogs(headers: nil, **query) ⇒ Array<Hash>
Get list of Dialogs. Requires ‘messages` oauth scope
28 29 30 |
# File 'lib/shikimori/api/v1/dialogs.rb', line 28 def dialogs(headers: nil, **query) rest.get base_url.join('dialogs').url, headers: headers, query: query end |