Class: BlizzardApi::Wow::MythicKeystone

Inherits:
GenericDataEndpoint show all
Defined in:
lib/blizzard_api/wow/game_data/mythic_keystone.rb

Overview

This class allows access to World of Warcraft achievements

You can get an instance of this class using the default region as follows:

api_instance = BlizzardApi::Wow.mythic_keystone

Constant Summary

Constants inherited from Request

Request::CACHE_DAY, Request::CACHE_HOUR, Request::CACHE_TRIMESTER

Constants included from ApiStandards

ApiStandards::BASE_URLS

Instance Attribute Summary

Attributes inherited from Request

#mode, #region

Instance Method Summary collapse

Methods inherited from GenericDataEndpoint

#index, setup

Methods inherited from Request

#initialize

Methods inherited from Request

#initialize

Constructor Details

This class inherits a constructor from BlizzardApi::Wow::Request

Instance Method Details

#dungeon(id, **options) ⇒ Hash

Fetch all possible data for one of the items listed by the #dungeons using its id

in the configuration module

Parameters:

  • id (Integer)

    Dungeon id

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option



37
38
39
# File 'lib/blizzard_api/wow/game_data/mythic_keystone.rb', line 37

def dungeon(id, **options)
  api_request "#{endpoint_uri}/dungeon/#{id}", **default_options.merge(options)
end

#dungeons(**options) ⇒ Hash

Fetch all mythic keystone dungeons

in the configuration module

Parameters:

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option



25
26
27
# File 'lib/blizzard_api/wow/game_data/mythic_keystone.rb', line 25

def dungeons(**options)
  api_request "#{endpoint_uri}/dungeon/index", **default_options.merge(options)
end

#getObject



15
16
17
# File 'lib/blizzard_api/wow/game_data/mythic_keystone.rb', line 15

def get
  raise BlizzardApi::ApiException, 'Mythic keystone endpoint does not have a get method'
end

#period(id, **options) ⇒ Hash

Fetch all possible data for one of the items listed by the #periods using its id

in the configuration module

Parameters:

  • id (Integer)

    Mythic keystone period id

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option



59
60
61
# File 'lib/blizzard_api/wow/game_data/mythic_keystone.rb', line 59

def period(id, **options)
  api_request "#{endpoint_uri}/period/#{id}", **default_options.merge(options)
end

#periods(**options) ⇒ Hash

Fetch all mythic keystone periods

in the configuration module

Parameters:

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option



47
48
49
# File 'lib/blizzard_api/wow/game_data/mythic_keystone.rb', line 47

def periods(**options)
  api_request "#{endpoint_uri}/period/index", **default_options.merge(options)
end

#season(id, **options) ⇒ Hash

Fetch all possible data for one of the items listed by the #seasons using its id

in the configuration module

Parameters:

  • id (Integer)

    Mythic keystone season id

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option



81
82
83
# File 'lib/blizzard_api/wow/game_data/mythic_keystone.rb', line 81

def season(id, **options)
  api_request "#{endpoint_uri}/season/#{id}", **default_options.merge(options)
end

#seasons(**options) ⇒ Hash

Fetch all mythic keystone seasons

in the configuration module

Parameters:

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option



69
70
71
# File 'lib/blizzard_api/wow/game_data/mythic_keystone.rb', line 69

def seasons(**options)
  api_request "#{endpoint_uri}/season/index", **default_options.merge(options)
end