Module: Shikimori::API::V1::Stats

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

Overview

Methods for the Stats API

Instance Method Summary collapse

Instance Method Details

#active_users(headers: nil, **query) ⇒ Array<Integer>

Get list of active users

Examples:

Get list of active users

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

Parameters:

  • headers (Hash) (defaults to: nil)

    Request headers

  • query (Hash)

    Query string parameters for request

Returns:

  • (Array<Integer>)

    Array of ids of active users

See Also:



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

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