Module: Shikimori::API::V1::Genres

Included in:
Shikimori::API::V1
Defined in:
lib/shikimori/api/v1/genres.rb

Overview

Methods for the Genres API

Instance Method Summary collapse

Instance Method Details

#genres(headers: nil, **query) ⇒ Array<Hash>

Get list of genres

Examples:

Get list of genres

client = Shikimori::API::Client.new(
  app_name: 'Api Test',
  aceess_token: '****',
  refresh_token: '****'
)
client.v1.genres #=> [{ id: 1, ... }, ...]

Parameters:

  • headers (Hash) (defaults to: nil)

    Request headers

  • query (Hash)

    Query string parameters for request

Returns:

  • (Array<Hash>)

    Array of hashes representing genres

See Also:



25
26
27
# File 'lib/shikimori/api/v1/genres.rb', line 25

def genres(headers: nil, **query)
  rest.get base_url.join('genres').url, headers: headers, query: query
end