Class: BlizzardApi::Wow::Guild

Inherits:
Request show all
Includes:
Slug
Defined in:
lib/blizzard_api/wow/profile/guild.rb

Overview

This class allows access to World of Warcraft guild data

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

api_instance = BlizzardApi::Wow.guild

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 included from Slug

#string_to_slug

Methods inherited from Request

#initialize

Methods inherited from Request

#initialize

Constructor Details

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

Instance Method Details

#achievements(realm, guild, **options) ⇒ Hash

Return all guild achievements for a specified guild

in the configuration module

Parameters:

  • realm (String)

    The guild realm’s slug

  • guild (String)

    The guild’s name

  • 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



48
49
50
# File 'lib/blizzard_api/wow/profile/guild.rb', line 48

def achievements(realm, guild, **options)
  guild_request realm, guild, 'achievements', **options
end

#activity(realm, guild, **options) ⇒ Hash

Return guild activity

in the configuration module

Parameters:

  • realm (String)

    The guild realm’s slug

  • guild (String)

    The guild’s name

  • 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



60
61
62
# File 'lib/blizzard_api/wow/profile/guild.rb', line 60

def activity(realm, guild, **options)
  guild_request realm, guild, 'activity', **options
end

#get(realm, guild, **options) ⇒ Hash

Return data about the specified guild

in the configuration module

Parameters:

  • realm (String)

    The guild realm’s slug

  • guild (String)

    The guild’s name

  • 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



23
24
25
# File 'lib/blizzard_api/wow/profile/guild.rb', line 23

def get(realm, guild, **options)
  guild_request(realm, guild, **options)
end

#roster(realm, guild, **options) ⇒ Hash

Return all guild members for a specified guild

in the configuration module

Parameters:

  • realm (String)

    The guild realm’s slug

  • guild (String)

    The guild’s name

  • 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



36
37
38
# File 'lib/blizzard_api/wow/profile/guild.rb', line 36

def roster(realm, guild, **options)
  guild_request realm, guild, 'roster', **options
end