public GuildRoot GetGuild(string name, GuildOptions guildOptions, string realm) { var guild = new GuildRoot(); var url = string.Format(@"{0}/wow/guild/{1}/{2}?{3}&locale={4}&apikey={5}", _Host, realm, name, GuildFields.BuildOptionalFields(guildOptions), _Locale, _APIKey); guild = json.GetDataFromURL <GuildRoot>(url); return(guild); }
//realm in getGuildAsync does not work (404 not found), why? setting realm in apiclient constructor works. public async Task <GuildRoot> GetGuildAsync(string name, GuildOptions guildOptions, string realm) { var guild = new GuildRoot(); var url = string.Format( @"{0}/wow/guild/{1}/{2}?{3}&locale={4}&apikey={5}", _Host, realm, name, GuildFields.BuildOptionalFields(guildOptions), _Locale, _APIKey); guild = await this.jsonUtility.GetDataFromURLAsync <GuildRoot>(url); return(guild); }
//realm in getGuildAsync does not work (404 not found), why? setting realm in apiclient constructor works. public async Task <GuildRoot> GetGuildAsync(string name, GuildOptions guildOptions, string realm) { var url = $"{Host}/wow/guild/{realm}/{name}?{GuildFields.BuildOptionalFields(guildOptions)}&locale={Locale}&apikey={APIKey}"; return(await this._jsonUtility.GetDataFromURLAsync <GuildRoot>(url)); }
public async Task <Guild> GetGuildAsync(string realm, string guildName, GuildOptions guildOptions = GuildOptions.None) { string query = $"/wow/guild/{realm}/{guildName}"; return(await reader.GetAsync <Guild>(query, GuildFields.BuildOptionalFields(guildOptions))); }