Module: Shikimori::API::V1::Ignores Deprecated

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

Overview

Deprecated.

Methods for the Ignores API

Instance Method Summary collapse

Instance Method Details

#create_ignore(user_id, headers: nil, **query) ⇒ Hash

Add user to ignore by user id. Requires ‘ignores` oauth scope

Examples:

Add to ignore a user with id equal to 1

client = Shikimori::API::Client.new(
  app_name: 'Api Test',
  aceess_token: '****',
  refresh_token: '****'
)
client.v1.create_ignore(1)

Parameters:

  • user_id (#to_s)

    User id that add to ignores

  • headers (Hash) (defaults to: nil)

    Request headers

  • query (Hash)

    Query string parameters for request

Returns:

  • (Hash)

    Hash representing created user ignore

See Also:



31
32
33
34
35
# File 'lib/shikimori/api/v1/ignores.rb', line 31

def create_ignore(user_id, headers: nil, **query)
  rest.post base_url.join('ignores', user_id.to_s).url, {}, headers: headers, query: query

  true
end

#delete_ignore(user_id, headers: nil, **query) ⇒ Boolean

Delete a user from ignores by user id. Requires ‘ignores` oauth scope

Examples:

Delete a ignore

client = Shikimori::API::Client.new(
  app_name: 'Api Test',
  aceess_token: '****',
  refresh_token: '****'
)
client.v1.delete_ignore(1)

Parameters:

  • user_id (#to_s)

    User id that remove from ignores

  • headers (Hash) (defaults to: nil)

    Request headers

  • query (Hash)

    Query string parameters for request

Returns:

  • (Boolean)

    True if deletion successful, false otherwise.

See Also:



56
57
58
# File 'lib/shikimori/api/v1/ignores.rb', line 56

def delete_ignore(user_id, headers: nil, **query)
  rest.delete base_url.join('ignores', user_id.to_s).url, headers: headers, query: query
end