Module: Shikimori::API::V1::Bans

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

Overview

Methods for the Bans API

Instance Method Summary collapse

Instance Method Details

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

Get list of bans

Examples:

Get list of bans

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

Parameters:

  • headers (Hash) (defaults to: nil)

    Request headers

  • query (Hash)

    Query string parameters for request

Returns:

  • (Array<Hash>)

    Array of hashes representing bans

See Also:



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

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