Module: Shikimori::API::V1::Characters
- Included in:
- Shikimori::API::V1
- Defined in:
- lib/shikimori/api/v1/characters.rb
Overview
Methods for the Characters API
Instance Method Summary collapse
-
#character(id, headers: nil, **query) ⇒ Hash
Get a character by id.
-
#characters(headers: nil, **query) ⇒ Array<Hash>
Get list of Characters.
Instance Method Details
#character(id, headers: nil, **query) ⇒ Hash
Get a character by id
46 47 48 |
# File 'lib/shikimori/api/v1/characters.rb', line 46 def character(id, headers: nil, **query) rest.get base_url.join('characters', id.to_s).url, headers: headers, query: query end |
#characters(headers: nil, **query) ⇒ Array<Hash>
Get list of Characters
26 27 28 |
# File 'lib/shikimori/api/v1/characters.rb', line 26 def characters(headers: nil, **query) rest.get base_url.join('characters', 'search').url, headers: headers, query: query end |