Class: BlizzardApi::Wow::Quest

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

Overview

This class allows access to World of Warcraft quest data

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

api_instance = BlizzardApi::Wow.quest

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

#get, #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

#area(id, **options) ⇒ Hash

Return data about a quest area

in the configuration module

Parameters:

  • id (Integer)

    Quest category 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



53
54
55
# File 'lib/blizzard_api/wow/game_data/quest.rb', line 53

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

#areas(**options) ⇒ Hash

Return a list of quest areas

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



42
43
44
# File 'lib/blizzard_api/wow/game_data/quest.rb', line 42

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

#categories(**options) ⇒ Hash

Return a list of quest categories

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



21
22
23
# File 'lib/blizzard_api/wow/game_data/quest.rb', line 21

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

#category(id, **options) ⇒ Hash

Return data about a quest category

in the configuration module

Parameters:

  • id (Integer)

    Quest category 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



32
33
34
# File 'lib/blizzard_api/wow/game_data/quest.rb', line 32

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

#type(id, **options) ⇒ Hash

Return data about a quest type

in the configuration module

Parameters:

  • id (Integer)

    Quest type

  • 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



74
75
76
# File 'lib/blizzard_api/wow/game_data/quest.rb', line 74

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

#types(**options) ⇒ Hash

Return a list of quest types

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



63
64
65
# File 'lib/blizzard_api/wow/game_data/quest.rb', line 63

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