class BlizzardApi::Wow::Guild

This class allows access to World of Warcraft guild data

@see develop.battle.net/documentation/api-reference/world-of-warcraft-game-data-api

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

api_instance = BlizzardApi::Wow.guild

Public Instance Methods

achievements(realm, guild, **options) click to toggle source

Return all guild achievements for a specified guild

@param realm [String] The guild realm's slug @param guild [String] The guild's name @!macro request_options

@!macro response

# 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) click to toggle source

Return guild activity

@param realm [String] The guild realm's slug @param guild [String] The guild's name @!macro request_options

@!macro response

# 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) click to toggle source

Return data about the specified guild

@param realm [String] The guild realm's slug @param guild [String] The guild's name @!macro request_options

@!macro response

# 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) click to toggle source

Return all guild members for a specified guild

@param realm [String] The guild realm's slug @param guild [String] The guild's name

@!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/guild.rb, line 36
def roster(realm, guild, **options)
  guild_request realm, guild, 'roster', **options
end

Private Instance Methods

guild_request(realm, guild, variant = nil, **options) click to toggle source
# File lib/blizzard_api/wow/profile/guild.rb, line 66
def guild_request(realm, guild, variant = nil, **options)
  realm = string_to_slug(realm)
  guild = string_to_slug(guild)
  url = "#{base_url(:game_data)}/guild/#{realm}/#{guild}"
  url += "/#{variant}" if variant
  api_request url, **{ ttl: CACHE_DAY, namespace: :profile }.merge(options)
end