public void GetGuildDetailsByNameTest(string guild_name, bool ignoreCache) { var actual = GwApi.GetGuildDetailsByName(guild_name, ignoreCache); var expected = TestData.GuildDetailsExpected.Single(g => g.GuildName == guild_name); VerifyGuildDetailsEntry(expected, actual); }
public void GuildExample() { var guild = GwApi.GetGuildDetailsByName("Valour Of The Forsaken"); StringBuilder sb = new StringBuilder("Guild Info\n"); sb.AppendFormat("Name: {0}\n", guild.GuildName); sb.AppendFormat("Tag: {0}\n", guild.Tag); sb.AppendFormat("ID: {0}\n", guild.GuildId); sb.AppendFormat("We have emblem information too. " + "But we can't display that in console. " + "I'll leave that up to you to implement for now.\n"); Console.WriteLine(sb.ToString()); }
private void buttonSearch_Click(object sender, EventArgs e) { try { Status = "Searching"; if (listView1.Items.ContainsKey(GuildNameSearch) == false) { var guildDetails = GwApi.GetGuildDetailsByName(GuildNameSearch); _addToListView(guildDetails); } } catch (Exception exception) { MessageBox.Show(string.Format("Error adding guild '{0}'\n{1}", GuildNameSearch, exception.Message), "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } Status = "Done"; }