Module: Shikimori::API::V1::Calendars

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

Overview

Methods for the Calendars API

Instance Method Summary collapse

Instance Method Details

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

Get a calendar

Examples:

Get a calendar

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

Parameters:

  • headers (Hash) (defaults to: nil)

    Request headers

  • query (Hash)

    Query string parameters for request

Options Hash (**query):

  • :censored (TrueClass, FalseClass)

    Set to false to allow hentai, yaoi and yuri

Returns:

  • (Array<Hash>)

    Array of hashes representing calendars

See Also:



26
27
28
# File 'lib/shikimori/api/v1/calendars.rb', line 26

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