├── .gitignore ├── .travis.yml ├── Explorers.Test ├── AchievementTests.cs ├── AuctionTests.cs ├── ChallengesTests.cs ├── CharacterTests.cs ├── DataTests.cs ├── Explorers.Test.csproj ├── GuildTests.cs ├── ItemTests.cs ├── MountTests.cs ├── PetTests.cs ├── Properties │ └── AssemblyInfo.cs ├── QuestTests.cs ├── RealmTests.cs ├── RecipeTests.cs ├── SpellTests.cs ├── TestStrings.Designer.cs ├── TestStrings.resx └── TestUtility.cs ├── Explorers ├── Explorers.csproj ├── Explorers.nuspec ├── IExplorer.cs ├── Models │ ├── AchievementCategory.cs │ ├── AchievementCriteria.cs │ ├── AchievementData.cs │ ├── AchievementInfo.cs │ ├── AchievementList.cs │ ├── AchievementReward.cs │ ├── Achievements.cs │ ├── Auction.cs │ ├── AuctionFile.cs │ ├── AuctionFiles.cs │ ├── AuctionHouseSide.cs │ ├── Auctions.cs │ ├── BattlegroupData.cs │ ├── BattlegroupInfo.cs │ ├── Challenge.cs │ ├── ChallengeGroup.cs │ ├── ChallengeMap.cs │ ├── ChallengeMember.cs │ ├── ChallengeMemberCharacter.cs │ ├── ChallengeTime.cs │ ├── Challenges.cs │ ├── Character.cs │ ├── CharacterAppearance.cs │ ├── CharacterArenaTeam.cs │ ├── CharacterClassInfo.cs │ ├── CharacterClassesData.cs │ ├── CharacterEquipment.cs │ ├── CharacterFeed.cs │ ├── CharacterGuild.cs │ ├── CharacterGuildEmblem.cs │ ├── CharacterHunterPet.cs │ ├── CharacterItem.cs │ ├── CharacterItemArtifactTrait.cs │ ├── CharacterItemRelic.cs │ ├── CharacterMount.cs │ ├── CharacterMounts.cs │ ├── CharacterPVP.cs │ ├── CharacterPetSlot.cs │ ├── CharacterPets.cs │ ├── CharacterProfession.cs │ ├── CharacterProfessions.cs │ ├── CharacterPvPBracket.cs │ ├── CharacterPvPBrackets.cs │ ├── CharacterRaceInfo.cs │ ├── CharacterRacesData.cs │ ├── CharacterRatedBattleground.cs │ ├── CharacterRatedBattlegrounds.cs │ ├── CharacterReputation.cs │ ├── CharacterStatisticEntry.cs │ ├── CharacterStatistics.cs │ ├── CharacterStatisticsSubcategory.cs │ ├── CharacterStats.cs │ ├── CharacterTalent.cs │ ├── CharacterTalentGlyph.cs │ ├── CharacterTalentGlyphs.cs │ ├── CharacterTalentInfo.cs │ ├── CharacterTalentSpec.cs │ ├── CharacterTalentSpell.cs │ ├── CharacterTitle.cs │ ├── Guild.cs │ ├── GuildCharacter.cs │ ├── GuildCharacterSpec.cs │ ├── GuildEmblem.cs │ ├── GuildMember.cs │ ├── GuildNews.cs │ ├── GuildPerkInfo.cs │ ├── GuildPerkSpellInfo.cs │ ├── GuildPerksData.cs │ ├── GuildRewardAchievementInfo.cs │ ├── GuildRewardInfo.cs │ ├── GuildRewardItemInfo.cs │ ├── GuildRewardsData.cs │ ├── Item.cs │ ├── ItemBonusStat.cs │ ├── ItemClassData.cs │ ├── ItemClassInfo.cs │ ├── ItemGemBonusInfo.cs │ ├── ItemGemInfo.cs │ ├── ItemGemType.cs │ ├── ItemSocket.cs │ ├── ItemSocketInfo.cs │ ├── ItemSourceInfo.cs │ ├── ItemSpell.cs │ ├── ItemSpellInfo.cs │ ├── ItemStat.cs │ ├── ItemTooltipParameters.cs │ ├── ItemUpgrade.cs │ ├── ItemWeaponDamage.cs │ ├── ItemWeaponInfo.cs │ ├── Leaderboard.cs │ ├── Mount.cs │ ├── Mounts.cs │ ├── Pet.cs │ ├── PetAbility.cs │ ├── PetAbilityDetails.cs │ ├── PetList.cs │ ├── PetSpecies.cs │ ├── PetStats.cs │ ├── PetType.cs │ ├── PetTypeData.cs │ ├── Progression.cs │ ├── PvpStats.cs │ ├── Quest.cs │ ├── Raid.cs │ ├── RaidBoss.cs │ ├── Realm.cs │ ├── RealmsData.cs │ ├── Recipe.cs │ └── Spell.cs ├── Properties │ └── AssemblyInfo.cs ├── Utilities │ ├── CharacterUtility.cs │ ├── GuildUtility.cs │ └── JsonUtility.cs ├── WowExplorer.cs └── lib │ └── 4.0 │ └── WowDotNetAPI.dll ├── Readme.md └── WowDotNetAPI.sln /.gitignore: -------------------------------------------------------------------------------- 1 | #OS junk files 2 | [Tt]humbs.db 3 | *.DS_Store 4 | 5 | #Visual Studio files 6 | *.[Oo]bj 7 | *.exe 8 | *.pdb 9 | *.user 10 | *.aps 11 | *.pch 12 | *.vspscc 13 | *.vssscc 14 | *_i.c 15 | *_p.c 16 | *.ncb 17 | *.suo 18 | *.tlb 19 | *.tlh 20 | *.bak 21 | *.[Cc]ache 22 | *.ilk 23 | *.log 24 | *.lib 25 | *.sbr 26 | *.sdf 27 | ipch/ 28 | obj/ 29 | [Bb]in 30 | [Dd]ebug*/ 31 | [Rr]elease*/ 32 | Ankh.NoLoad 33 | 34 | #Tooling 35 | _ReSharper*/ 36 | *.resharper 37 | [Tt]est[Rr]esult* 38 | 39 | #Project files 40 | [Bb]uild/ 41 | *.nupkg 42 | /.vs/WowDotNetAPI/v15/sqlite3 43 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: csharp 2 | script: 3 | - msbuild /p:Configuration=Debug WowDotNetAPI.sln 4 | before_install: 5 | - sudo apt-get install nunit-console 6 | - msbuild-prepare 7 | before_script: 8 | - nuget restore WowDotNetAPI.sln 9 | after_script: 10 | - nunit-console Explorers.Test/bin/Debug/WowDotNetAPI.Explorers.Test.dll -------------------------------------------------------------------------------- /Explorers.Test/AchievementTests.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using WowDotNetAPI.Models; 4 | 5 | namespace WowDotNetAPI.Explorers.Test 6 | { 7 | [TestClass] 8 | public class AchievementTests 9 | { 10 | private static WowExplorer explorer; 11 | private static string APIKey = TestStrings.APIKey; 12 | 13 | [ClassInitialize] 14 | public static void ClassInit(TestContext context) 15 | { 16 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 17 | } 18 | 19 | [TestMethod] 20 | public void Get_Achievements_List() 21 | { 22 | var achievements = explorer.GetAchievements(); 23 | Assert.IsTrue(achievements != null && achievements.Count() > 0); 24 | } 25 | 26 | [TestMethod] 27 | public void Get_Achievement_Details() 28 | { 29 | var achievement = explorer.GetAchievement(2144); 30 | Assert.IsNotNull(achievement); 31 | } 32 | 33 | [TestMethod] 34 | public void Get_Guild_Achievements_List() 35 | { 36 | var achievements = explorer.GetGuildAchievements(); 37 | Assert.IsTrue(achievements != null && achievements.Count() > 0); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Explorers.Test/AuctionTests.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using WowDotNetAPI.Models; 4 | 5 | namespace WowDotNetAPI.Explorers.Test 6 | { 7 | [TestClass] 8 | public class AuctionTests 9 | { 10 | private static WowExplorer explorer; 11 | private static string APIKey = TestStrings.APIKey; 12 | 13 | [ClassInitialize] 14 | public static void ClassInit(TestContext context) 15 | { 16 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 17 | } 18 | 19 | [TestMethod] 20 | public void Get_Auction_Data() 21 | { 22 | Auctions auctions = explorer.GetAuctions("skullcrusher"); 23 | Assert.IsTrue(auctions.CurrentAuctions.Count() > 0); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Explorers.Test/ChallengesTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using WowDotNetAPI.Utilities; 7 | using System.Net; 8 | using System.Web.Script.Serialization; 9 | using WowDotNetAPI.Models; 10 | 11 | namespace WowDotNetAPI.Explorers.Test 12 | { 13 | [TestClass] 14 | public class ChallengesTests 15 | { 16 | private static WowExplorer explorer; 17 | private static Challenges challenges; 18 | private static string APIKey = TestStrings.APIKey; 19 | 20 | [ClassInitialize] 21 | public static void ClassInit(TestContext context) 22 | { 23 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 24 | } 25 | 26 | [TestMethod] 27 | public void Get_Challenges_From_Skullcrusher() 28 | { 29 | challenges = explorer.GetChallenges("skullcrusher"); 30 | Assert.IsTrue(challenges.Challenge.Count() > 0); 31 | Assert.AreEqual("Auchindoun", challenges.Challenge.First().Map.Name); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Explorers.Test/CharacterTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using WowDotNetAPI.Models; 7 | using WowDotNetAPI.Explorers.Test; 8 | 9 | namespace WowDotNetAPI.Test 10 | { 11 | [TestClass] 12 | public class CharacterTests 13 | { 14 | private static WowExplorer explorer; 15 | private static string APIKey = TestStrings.APIKey; 16 | private const Region WowRegion = Region.US; 17 | private const Locale WowLocale = Locale.en_US; 18 | private const string CharacterName = "briandek"; 19 | private const string Realm = "korgath"; 20 | private const int level = 110; 21 | private const CharacterClass cClass = CharacterClass.WARRIOR; 22 | private const CharacterRace cRace = CharacterRace.HUMAN; 23 | private const CharacterGender cGender = CharacterGender.MALE; 24 | 25 | [ClassInitialize] 26 | public static void ClassInit(TestContext context) 27 | { 28 | explorer = new WowExplorer(WowRegion, WowLocale, APIKey); 29 | } 30 | 31 | [TestMethod] 32 | public void Get_Simple_Character() 33 | { 34 | 35 | var briandek = explorer.GetCharacter(Realm, CharacterName); 36 | 37 | Assert.IsNull(briandek.Guild); 38 | Assert.IsNull(briandek.Stats); 39 | Assert.IsNull(briandek.Talents); 40 | Assert.IsNull(briandek.Items); 41 | Assert.IsNull(briandek.Reputation); 42 | Assert.IsNull(briandek.Titles); 43 | Assert.IsNull(briandek.Professions); 44 | Assert.IsNull(briandek.Appearance); 45 | Assert.IsNull(briandek.PetSlots); 46 | Assert.IsNull(briandek.Mounts); 47 | Assert.IsNull(briandek.Pets); 48 | Assert.IsNull(briandek.Achievements); 49 | Assert.IsNull(briandek.Progression); 50 | 51 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 52 | Assert.AreEqual(level, briandek.Level); 53 | Assert.AreEqual(cClass, briandek.@Class); 54 | Assert.AreEqual(cRace, briandek.Race); 55 | Assert.AreEqual(cGender, briandek.Gender); 56 | } 57 | 58 | [TestMethod] 59 | public void Get_Simple_Character_WithGuild() 60 | { 61 | 62 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetGuild); 63 | 64 | Assert.IsNotNull(briandek.Guild); 65 | Assert.IsNull(briandek.Stats); 66 | Assert.IsNull(briandek.Talents); 67 | Assert.IsNull(briandek.Items); 68 | Assert.IsNull(briandek.Reputation); 69 | Assert.IsNull(briandek.Titles); 70 | Assert.IsNull(briandek.Professions); 71 | Assert.IsNull(briandek.Appearance); 72 | Assert.IsNull(briandek.PetSlots); 73 | Assert.IsNull(briandek.Mounts); 74 | Assert.IsNull(briandek.Pets); 75 | Assert.IsNull(briandek.Achievements); 76 | Assert.IsNull(briandek.Progression); 77 | 78 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 79 | Assert.AreEqual(level, briandek.Level); 80 | Assert.AreEqual(cClass, briandek.@Class); 81 | Assert.AreEqual(cRace, briandek.Race); 82 | Assert.AreEqual(cGender, briandek.Gender); 83 | } 84 | 85 | [TestMethod] 86 | public void Get_Simple_Character_WithStats() 87 | { 88 | 89 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetStats); 90 | 91 | Assert.IsNull(briandek.Guild); 92 | Assert.IsNotNull(briandek.Stats); 93 | Assert.IsNull(briandek.Talents); 94 | Assert.IsNull(briandek.Items); 95 | Assert.IsNull(briandek.Reputation); 96 | Assert.IsNull(briandek.Titles); 97 | Assert.IsNull(briandek.Professions); 98 | Assert.IsNull(briandek.Appearance); 99 | Assert.IsNull(briandek.PetSlots); 100 | Assert.IsNull(briandek.Mounts); 101 | Assert.IsNull(briandek.Pets); 102 | Assert.IsNull(briandek.Achievements); 103 | Assert.IsNull(briandek.Progression); 104 | 105 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 106 | Assert.AreEqual(level, briandek.Level); 107 | Assert.AreEqual(cClass, briandek.@Class); 108 | Assert.AreEqual(cRace, briandek.Race); 109 | Assert.AreEqual(cGender, briandek.Gender); 110 | } 111 | 112 | [TestMethod] 113 | public void Get_Simple_Character_WithTalents() 114 | { 115 | 116 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetTalents); 117 | 118 | Assert.IsNull(briandek.Guild); 119 | Assert.IsNull(briandek.Stats); 120 | Assert.IsNotNull(briandek.Talents); 121 | Assert.IsNull(briandek.Items); 122 | Assert.IsNull(briandek.Reputation); 123 | Assert.IsNull(briandek.Titles); 124 | Assert.IsNull(briandek.Professions); 125 | Assert.IsNull(briandek.Appearance); 126 | Assert.IsNull(briandek.PetSlots); 127 | Assert.IsNull(briandek.Mounts); 128 | Assert.IsNull(briandek.Pets); 129 | Assert.IsNull(briandek.Achievements); 130 | Assert.IsNull(briandek.Progression); 131 | 132 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 133 | Assert.AreEqual(level, briandek.Level); 134 | Assert.AreEqual(cClass, briandek.@Class); 135 | Assert.AreEqual(cRace, briandek.Race); 136 | Assert.AreEqual(cGender, briandek.Gender); 137 | } 138 | 139 | [TestMethod] 140 | public void Get_Simple_Character_WithItems() 141 | { 142 | 143 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetItems); 144 | 145 | Assert.IsNull(briandek.Guild); 146 | Assert.IsNull(briandek.Stats); 147 | Assert.IsNull(briandek.Talents); 148 | Assert.IsNotNull(briandek.Items); 149 | Assert.IsNull(briandek.Reputation); 150 | Assert.IsNull(briandek.Titles); 151 | Assert.IsNull(briandek.Professions); 152 | Assert.IsNull(briandek.Appearance); 153 | Assert.IsNull(briandek.PetSlots); 154 | Assert.IsNull(briandek.Mounts); 155 | Assert.IsNull(briandek.Pets); 156 | Assert.IsNull(briandek.Achievements); 157 | Assert.IsNull(briandek.Progression); 158 | 159 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 160 | Assert.AreEqual(level, briandek.Level); 161 | Assert.AreEqual(cClass, briandek.@Class); 162 | Assert.AreEqual(cRace, briandek.Race); 163 | Assert.AreEqual(cGender, briandek.Gender); 164 | Assert.IsNull(briandek.Items.Tabard); 165 | } 166 | 167 | 168 | [TestMethod] 169 | public void Get_Simple_Character_WithReputations() 170 | { 171 | 172 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetReputation); 173 | 174 | Assert.IsNull(briandek.Guild); 175 | Assert.IsNull(briandek.Stats); 176 | Assert.IsNull(briandek.Talents); 177 | Assert.IsNull(briandek.Items); 178 | Assert.IsNotNull(briandek.Reputation); 179 | Assert.IsNull(briandek.Titles); 180 | Assert.IsNull(briandek.Professions); 181 | Assert.IsNull(briandek.Appearance); 182 | Assert.IsNull(briandek.PetSlots); 183 | Assert.IsNull(briandek.Mounts); 184 | Assert.IsNull(briandek.Pets); 185 | Assert.IsNull(briandek.Achievements); 186 | Assert.IsNull(briandek.Progression); 187 | 188 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 189 | Assert.AreEqual(level, briandek.Level); 190 | Assert.AreEqual(cClass, briandek.@Class); 191 | Assert.AreEqual(cRace, briandek.Race); 192 | Assert.AreEqual(cGender, briandek.Gender); 193 | } 194 | 195 | [TestMethod] 196 | public void Get_Simple_Character_WithTitles() 197 | { 198 | 199 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetTitles); 200 | 201 | Assert.IsNull(briandek.Guild); 202 | Assert.IsNull(briandek.Stats); 203 | Assert.IsNull(briandek.Talents); 204 | Assert.IsNull(briandek.Items); 205 | Assert.IsNull(briandek.Reputation); 206 | Assert.IsNotNull(briandek.Titles); 207 | Assert.IsNull(briandek.Professions); 208 | Assert.IsNull(briandek.Appearance); 209 | Assert.IsNull(briandek.PetSlots); 210 | Assert.IsNull(briandek.Mounts); 211 | Assert.IsNull(briandek.Pets); 212 | Assert.IsNull(briandek.Achievements); 213 | Assert.IsNull(briandek.Progression); 214 | 215 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 216 | Assert.AreEqual(level, briandek.Level); 217 | Assert.AreEqual(cClass, briandek.@Class); 218 | Assert.AreEqual(cRace, briandek.Race); 219 | Assert.AreEqual(cGender, briandek.Gender); 220 | } 221 | 222 | [TestMethod] 223 | public void Get_Simple_Character_WithProfessions() 224 | { 225 | 226 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetProfessions); 227 | 228 | Assert.IsNull(briandek.Guild); 229 | Assert.IsNull(briandek.Stats); 230 | Assert.IsNull(briandek.Talents); 231 | Assert.IsNull(briandek.Items); 232 | Assert.IsNull(briandek.Reputation); 233 | Assert.IsNull(briandek.Titles); 234 | Assert.IsNotNull(briandek.Professions); 235 | Assert.IsNull(briandek.Appearance); 236 | Assert.IsNull(briandek.PetSlots); 237 | Assert.IsNull(briandek.Mounts); 238 | Assert.IsNull(briandek.Pets); 239 | Assert.IsNull(briandek.Achievements); 240 | Assert.IsNull(briandek.Progression); 241 | 242 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 243 | Assert.AreEqual(level, briandek.Level); 244 | Assert.AreEqual(cClass, briandek.@Class); 245 | Assert.AreEqual(cRace, briandek.Race); 246 | Assert.AreEqual(cGender, briandek.Gender); 247 | } 248 | 249 | [TestMethod] 250 | public void Get_Simple_Character_WithAppearance() 251 | { 252 | 253 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetAppearance); 254 | 255 | Assert.IsNull(briandek.Guild); 256 | Assert.IsNull(briandek.Stats); 257 | Assert.IsNull(briandek.Talents); 258 | Assert.IsNull(briandek.Items); 259 | Assert.IsNull(briandek.Reputation); 260 | Assert.IsNull(briandek.Titles); 261 | Assert.IsNull(briandek.Professions); 262 | Assert.IsNotNull(briandek.Appearance); 263 | Assert.IsNull(briandek.PetSlots); 264 | Assert.IsNull(briandek.Mounts); 265 | Assert.IsNull(briandek.Pets); 266 | Assert.IsNull(briandek.Achievements); 267 | Assert.IsNull(briandek.Progression); 268 | 269 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 270 | Assert.AreEqual(level, briandek.Level); 271 | Assert.AreEqual(cClass, briandek.@Class); 272 | Assert.AreEqual(cRace, briandek.Race); 273 | Assert.AreEqual(cGender, briandek.Gender); 274 | } 275 | 276 | [TestMethod] 277 | public void Get_Simple_Character_WithPetSlots() 278 | { 279 | 280 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetPetSlots); 281 | 282 | Assert.IsNull(briandek.Guild); 283 | Assert.IsNull(briandek.Stats); 284 | Assert.IsNull(briandek.Talents); 285 | Assert.IsNull(briandek.Items); 286 | Assert.IsNull(briandek.Reputation); 287 | Assert.IsNull(briandek.Titles); 288 | Assert.IsNull(briandek.Professions); 289 | Assert.IsNull(briandek.Appearance); 290 | Assert.IsNotNull(briandek.PetSlots); 291 | Assert.IsNull(briandek.Mounts); 292 | Assert.IsNull(briandek.Pets); 293 | Assert.IsNull(briandek.Achievements); 294 | Assert.IsNull(briandek.Progression); 295 | 296 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 297 | Assert.AreEqual(level, briandek.Level); 298 | Assert.AreEqual(cClass, briandek.@Class); 299 | Assert.AreEqual(cRace, briandek.Race); 300 | Assert.AreEqual(cGender, briandek.Gender); 301 | Assert.IsTrue(briandek.PetSlots.Count() > 0); 302 | } 303 | 304 | [TestMethod] 305 | public void Get_Simple_Character_WithMounts() 306 | { 307 | 308 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetMounts); 309 | 310 | Assert.IsNull(briandek.Guild); 311 | Assert.IsNull(briandek.Stats); 312 | Assert.IsNull(briandek.Talents); 313 | Assert.IsNull(briandek.Items); 314 | Assert.IsNull(briandek.Reputation); 315 | Assert.IsNull(briandek.Titles); 316 | Assert.IsNull(briandek.Professions); 317 | Assert.IsNull(briandek.Appearance); 318 | Assert.IsNull(briandek.PetSlots); 319 | Assert.IsNotNull(briandek.Mounts); 320 | Assert.IsNull(briandek.Pets); 321 | Assert.IsNull(briandek.Achievements); 322 | Assert.IsNull(briandek.Progression); 323 | 324 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 325 | Assert.AreEqual(level, briandek.Level); 326 | Assert.AreEqual(cClass, briandek.@Class); 327 | Assert.AreEqual(cRace, briandek.Race); 328 | Assert.AreEqual(cGender, briandek.Gender); 329 | Assert.IsTrue(briandek.Mounts.NumCollected > 1); 330 | Assert.IsTrue(briandek.Mounts.NumNotCollected > 1); 331 | } 332 | 333 | [TestMethod] 334 | public void Get_Simple_Character_WithAchievements() 335 | { 336 | 337 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetAchievements); 338 | 339 | Assert.IsNull(briandek.Guild); 340 | Assert.IsNull(briandek.Stats); 341 | Assert.IsNull(briandek.Talents); 342 | Assert.IsNull(briandek.Items); 343 | Assert.IsNull(briandek.Reputation); 344 | Assert.IsNull(briandek.Titles); 345 | Assert.IsNull(briandek.Professions); 346 | Assert.IsNull(briandek.Appearance); 347 | Assert.IsNull(briandek.PetSlots); 348 | Assert.IsNull(briandek.Mounts); 349 | Assert.IsNull(briandek.Pets); 350 | Assert.IsNotNull(briandek.Achievements); 351 | Assert.IsNull(briandek.Progression); 352 | 353 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 354 | Assert.AreEqual(level, briandek.Level); 355 | Assert.AreEqual(cClass, briandek.@Class); 356 | Assert.AreEqual(cRace, briandek.Race); 357 | Assert.AreEqual(cGender, briandek.Gender); 358 | } 359 | 360 | [TestMethod] 361 | public void Get_Simple_Character_WithProgression() 362 | { 363 | 364 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetProgression); 365 | 366 | Assert.IsNull(briandek.Guild); 367 | Assert.IsNull(briandek.Stats); 368 | Assert.IsNull(briandek.Talents); 369 | Assert.IsNull(briandek.Items); 370 | Assert.IsNull(briandek.Reputation); 371 | Assert.IsNull(briandek.Titles); 372 | Assert.IsNull(briandek.Professions); 373 | Assert.IsNull(briandek.Appearance); 374 | Assert.IsNull(briandek.PetSlots); 375 | Assert.IsNull(briandek.Mounts); 376 | Assert.IsNull(briandek.Pets); 377 | Assert.IsNull(briandek.Achievements); 378 | Assert.IsNotNull(briandek.Progression); 379 | 380 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 381 | Assert.AreEqual(level, briandek.Level); 382 | Assert.AreEqual(cClass, briandek.@Class); 383 | Assert.AreEqual(cRace, briandek.Race); 384 | Assert.AreEqual(cGender, briandek.Gender); 385 | } 386 | 387 | [TestMethod] 388 | public void Get_Complex_Character() 389 | { 390 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetEverything); 391 | 392 | Assert.IsNotNull(briandek.Guild); 393 | Assert.IsNotNull(briandek.Stats); 394 | Assert.IsNotNull(briandek.Talents); 395 | Assert.IsNotNull(briandek.Items); 396 | Assert.IsNotNull(briandek.Reputation); 397 | Assert.IsNotNull(briandek.Titles); 398 | Assert.IsNotNull(briandek.Professions); 399 | Assert.IsNotNull(briandek.Appearance); 400 | Assert.IsNotNull(briandek.PetSlots); 401 | Assert.IsNotNull(briandek.Mounts); 402 | Assert.IsNotNull(briandek.Pets); 403 | Assert.IsNotNull(briandek.Achievements); 404 | Assert.IsNotNull(briandek.Progression); 405 | 406 | Assert.IsTrue(briandek.Name.Equals(CharacterName, StringComparison.InvariantCultureIgnoreCase)); 407 | Assert.AreEqual(level, briandek.Level); 408 | Assert.AreEqual(cClass, briandek.@Class); 409 | Assert.AreEqual(cRace, briandek.Race); 410 | Assert.AreEqual(cGender, briandek.Gender); 411 | } 412 | 413 | [TestMethod] 414 | public void Get_Artifact_Weapon() { 415 | var briandek = explorer.GetCharacter(Realm, CharacterName, CharacterOptions.GetEverything); 416 | 417 | Assert.IsNotNull(briandek.Items); 418 | Assert.IsTrue(briandek.Items.MainHand.ArtifactId > 0); 419 | Assert.IsTrue(briandek.Items.MainHand.Relics.Any()); 420 | } 421 | } 422 | } 423 | -------------------------------------------------------------------------------- /Explorers.Test/DataTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.IO; 6 | using System.Reflection; 7 | using Microsoft.VisualStudio.TestTools.UnitTesting; 8 | using WowDotNetAPI.Test; 9 | using System.Collections; 10 | using WowDotNetAPI.Models; 11 | using WowDotNetAPI.Utilities; 12 | using WowDotNetAPI; 13 | 14 | namespace WowDotNetAPI.Explorers.Test 15 | { 16 | [TestClass] 17 | public class DataTests 18 | { 19 | private static WowExplorer explorer; 20 | private static string APIKey = TestStrings.APIKey; 21 | 22 | [ClassInitialize] 23 | public static void ClassInit(TestContext context) 24 | { 25 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 26 | } 27 | 28 | [TestMethod] 29 | public void Get_BattleGroups_Test() 30 | { 31 | var battleGroups = explorer.GetBattlegroupsData(); 32 | 33 | Assert.AreEqual(9, battleGroups.Count()); 34 | Assert.IsTrue(battleGroups.Any(r => r.Name == "Rampage")); 35 | } 36 | 37 | [TestMethod] 38 | public void Get_Character_Races_Data() 39 | { 40 | var races = explorer.GetCharacterRaces(); 41 | 42 | Assert.AreEqual(15, races.Count()); 43 | Assert.IsTrue(races.Any(r => r.Name == "Human" || r.Name == "Night Elf")); 44 | } 45 | 46 | [TestMethod] 47 | public void Get_Character_Achievements_Data() 48 | { 49 | var characterAchievements = explorer.GetAchievements(); 50 | 51 | Assert.AreEqual(15, characterAchievements.Count()); 52 | var achievementList = characterAchievements.First(a => a.Id == 92); 53 | var gotMyMindOnMyMoneyAchievement = achievementList.Achievements.First(a => a.Id == 1181); 54 | Assert.AreEqual("Loot 25,000 gold", gotMyMindOnMyMoneyAchievement.Criteria.ElementAt(0).Description); 55 | 56 | } 57 | 58 | [TestMethod] 59 | public void Get_Character_Classes_Data() 60 | { 61 | var classes = explorer.GetCharacterClasses(); 62 | Assert.AreEqual(classes.Count(), 12); 63 | Assert.IsTrue(classes.Any(r => r.Name == "Warrior" || r.Name == "Death Knight")); 64 | } 65 | 66 | [TestMethod] 67 | public void Get_Guild_Achievements_Data() 68 | { 69 | var guildAchievementsList = explorer.GetGuildAchievements(); 70 | Assert.AreEqual(7, guildAchievementsList.Count()); 71 | } 72 | 73 | [TestMethod] 74 | public void Get_Guild_Rewards_Data() 75 | { 76 | var rewards = explorer.GetGuildRewards(); 77 | Assert.AreEqual(64, rewards.Count()); 78 | Assert.IsTrue(rewards.Any(r => r.Achievement != null)); 79 | } 80 | 81 | 82 | [TestMethod] 83 | public void Get_Guild_Perks_Data() 84 | { 85 | var perks = explorer.GetGuildPerks(); 86 | Assert.AreEqual(5, perks.Count()); 87 | Assert.IsTrue(perks.Any(r => r.Spell != null)); 88 | } 89 | 90 | [TestMethod] 91 | public void Get_Realms_From_Json_String() 92 | { 93 | var realms1 = explorer.GetRealms(); 94 | var realms2 = JsonUtility.FromJSONString(TestStrings.TestRealms).Realms; 95 | var realms3 = realms1.Intersect(realms2); 96 | Assert.AreEqual(0, realms3.Count()); 97 | 98 | } 99 | 100 | [TestMethod] 101 | public void Get_Item_Classes() 102 | { 103 | var itemClasses = explorer.GetItemClasses(); 104 | Assert.AreEqual(16, itemClasses.Count()); 105 | 106 | } 107 | 108 | } 109 | 110 | } 111 | -------------------------------------------------------------------------------- /Explorers.Test/Explorers.Test.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 7 | 8 | 2.0 9 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1} 10 | Library 11 | Properties 12 | WowDotNetAPI.Explorers.Test 13 | WowDotNetAPI.Explorers.Test 14 | v4.0 15 | 512 16 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 17 | 18 | 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 3.5 40 | 41 | 42 | 43 | 44 | 45 | 46 | False 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | True 65 | True 66 | TestStrings.resx 67 | 68 | 69 | 70 | 71 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9} 72 | Explorers 73 | 74 | 75 | 76 | 77 | ResXFileCodeGenerator 78 | TestStrings.Designer.cs 79 | 80 | 81 | 82 | 89 | -------------------------------------------------------------------------------- /Explorers.Test/GuildTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using WowDotNetAPI.Utilities; 7 | using System.Net; 8 | using System.Web.Script.Serialization; 9 | using WowDotNetAPI.Models; 10 | using WowDotNetAPI.Explorers.Test; 11 | 12 | namespace WowDotNetAPI.Test 13 | { 14 | [TestClass] 15 | public class GuildTests 16 | { 17 | private static WowExplorer explorer; 18 | private static Guild guild; 19 | private static string APIKey = TestStrings.APIKey; 20 | 21 | [ClassInitialize] 22 | public static void ClassInit(TestContext context) 23 | { 24 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 25 | guild = explorer.GetGuild("korgath", "immortality", GuildOptions.GetEverything); 26 | } 27 | 28 | [TestMethod] 29 | public void Get_Simple_Guild_Immortality_From_Korgath() 30 | { 31 | Assert.IsTrue(guild.Realm.Equals("korgath", StringComparison.InvariantCultureIgnoreCase)); 32 | Assert.AreEqual(UnitSide.ALLIANCE, guild.Side); 33 | Assert.IsTrue(guild.Members.Any()); 34 | } 35 | 36 | [TestMethod] 37 | public void Get_Valid_Night_Elf_Member_From_Immortality_Guild() 38 | { 39 | var guildMember = guild.Members.Where(m => m.Character.Name.Equals("fleas", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault(); 40 | 41 | Assert.IsTrue(guildMember.Character.Name.Equals("fleas", StringComparison.InvariantCultureIgnoreCase)); 42 | 43 | Assert.AreEqual(110, guildMember.Character.Level); 44 | Assert.AreEqual(CharacterClass.DRUID, guildMember.Character.@Class); 45 | Assert.AreEqual(CharacterRace.NIGHT_ELF, guildMember.Character.Race); 46 | Assert.AreEqual(CharacterGender.MALE, guildMember.Character.Gender); 47 | } 48 | 49 | [TestMethod] 50 | public void Get_Valid_Member_From_Another_Guild() 51 | { 52 | Guild guild = explorer.GetGuild("laughing skull", "deus vox", GuildOptions.GetMembers | GuildOptions.GetAchievements); 53 | 54 | 55 | Assert.IsNotNull(guild.Members); 56 | Assert.IsNotNull(guild.AchievementPoints); 57 | 58 | Assert.IsTrue(guild.Name.Equals("deus vox", StringComparison.InvariantCultureIgnoreCase)); 59 | Assert.IsTrue(guild.Realm.Equals("laughing skull", StringComparison.InvariantCultureIgnoreCase)); 60 | Assert.IsTrue(guild.Members.Any()); 61 | 62 | Assert.AreEqual(UnitSide.ALLIANCE, guild.Side); 63 | } 64 | 65 | [TestMethod] 66 | public void Get_Valid_Member_From_Horde_Guild() 67 | { 68 | Guild guild = explorer.GetGuild("skullcrusher", "rage", GuildOptions.GetMembers); 69 | 70 | Assert.IsNotNull(guild.Members); 71 | Assert.IsNull(guild.Achievements); 72 | 73 | Assert.IsTrue(guild.Name.Equals("rage", StringComparison.InvariantCultureIgnoreCase)); 74 | Assert.IsTrue(guild.Realm.Equals("skullcrusher", StringComparison.InvariantCultureIgnoreCase)); 75 | 76 | Assert.IsTrue(guild.Members.Any()); 77 | 78 | Assert.IsTrue(guild.Side == UnitSide.HORDE); 79 | } 80 | 81 | [TestMethod] 82 | public void Get_Guild_With_Only_Achievements() 83 | { 84 | Guild guild = explorer.GetGuild("skullcrusher", "immortality", GuildOptions.GetAchievements); 85 | 86 | 87 | Assert.IsNull(guild.Members); 88 | Assert.IsNotNull(guild.Achievements); 89 | 90 | Assert.IsTrue(guild.Realm.Equals("skullcrusher", StringComparison.InvariantCultureIgnoreCase)); 91 | Assert.AreEqual(UnitSide.ALLIANCE, guild.Side); 92 | } 93 | 94 | [TestMethod] 95 | public void Get_Guild_With_Only_Members() 96 | { 97 | Guild guild = explorer.GetGuild("skullcrusher", "immortality", GuildOptions.GetMembers); 98 | 99 | Assert.IsNotNull(guild.Members); 100 | Assert.IsNull(guild.Achievements); 101 | 102 | Assert.IsTrue(guild.Realm.Equals("skullcrusher", StringComparison.InvariantCultureIgnoreCase)); 103 | Assert.AreEqual(UnitSide.ALLIANCE, guild.Side); 104 | } 105 | 106 | [TestMethod] 107 | public void Get_Guild_With_Only_No_Options() 108 | { 109 | var guild = explorer.GetGuild("skullcrusher", "immortality", GuildOptions.None); 110 | 111 | Assert.IsNull(guild.Members); 112 | Assert.IsNull(guild.Achievements); 113 | 114 | Assert.IsTrue(guild.Realm.Equals("skullcrusher", StringComparison.InvariantCultureIgnoreCase)); 115 | Assert.AreEqual(UnitSide.ALLIANCE, guild.Side); 116 | } 117 | 118 | [TestMethod] 119 | public void Get_Guild_With_Base_Method_Call() 120 | { 121 | var guild = explorer.GetGuild("skullcrusher", "immortality"); 122 | 123 | Assert.IsNull(guild.Members); 124 | Assert.IsNull(guild.Achievements); 125 | 126 | Assert.IsTrue(guild.Realm.Equals("skullcrusher", StringComparison.InvariantCultureIgnoreCase)); 127 | Assert.AreEqual(UnitSide.ALLIANCE, guild.Side); 128 | } 129 | 130 | 131 | [TestMethod] 132 | public void Get_Guild_With_Connected_Realms() { 133 | WowExplorer explorer2 = new WowExplorer(Region.EU, Locale.en_GB, APIKey); 134 | Guild guild2 = explorer2.GetGuild("darksorrow", "mentality", GuildOptions.GetMembers); 135 | List guildMembers = guild2.Members.Where(x => x.Character.Name.Equals("Danishpala", StringComparison.CurrentCultureIgnoreCase)).ToList(); 136 | Assert.AreEqual(0, guildMembers.Count(x => !x.Character.Realm.Equals(x.Character.GuildRealm))); 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /Explorers.Test/ItemTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using WowDotNetAPI.Test; 7 | using WowDotNetAPI.Models; 8 | 9 | namespace WowDotNetAPI.Explorers.Test 10 | { 11 | [TestClass] 12 | public class ItemTests 13 | { 14 | private static WowExplorer explorer; 15 | private static string APIKey = TestStrings.APIKey; 16 | 17 | [ClassInitialize] 18 | public static void ClassInit(TestContext context) 19 | { 20 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 21 | } 22 | 23 | [TestMethod] 24 | public void Get_Sample_Item_38268() 25 | { 26 | var sampleItem = explorer.GetItem(38268); 27 | 28 | Assert.AreEqual("Spare Hand", sampleItem.Name); 29 | Assert.AreEqual("Give to a Friend", sampleItem.Description); 30 | Assert.AreEqual("inv_gauntlets_09", sampleItem.Icon); 31 | Assert.AreEqual(1, sampleItem.Stackable); 32 | Assert.AreEqual(0, sampleItem.ItemBind); 33 | Assert.AreEqual("WORLD_DROP", sampleItem.ItemSource.SourceType); 34 | Assert.AreEqual(1, sampleItem.WeaponInfo.Damage.MaxDamage); 35 | } 36 | 37 | 38 | 39 | [TestMethod] 40 | public void Get_Sample_Item_39564() 41 | { 42 | var sampleItem = explorer.GetItem(39564); 43 | 44 | Assert.AreEqual(@"Heroes' Bonescythe Legplates", sampleItem.Name); 45 | Assert.AreEqual("", sampleItem.Description); 46 | Assert.AreEqual("inv_pants_mail_15", sampleItem.Icon); 47 | Assert.AreEqual(1, sampleItem.Stackable); 48 | Assert.AreEqual(1, sampleItem.ItemBind); 49 | Assert.AreEqual("VENDOR", sampleItem.ItemSource.SourceType); 50 | 51 | Assert.AreEqual(null, sampleItem.WeaponInfo); 52 | 53 | Assert.AreEqual(4, sampleItem.AllowableClasses.First()); 54 | Assert.AreEqual(16, sampleItem.BonusStats.ElementAt(2).Amount); 55 | 56 | Assert.AreEqual("PRISMATIC", sampleItem.SocketInfo.Sockets.First().Type); 57 | 58 | 59 | } 60 | 61 | [TestMethod] 62 | public void Get_Sample_Item_17182() 63 | { 64 | var sampleItem = explorer.GetItem(17182); 65 | 66 | Assert.AreEqual("Sulfuras, Hand of Ragnaros", sampleItem.Name); 67 | Assert.AreEqual("", sampleItem.Description); 68 | Assert.AreEqual("inv_hammer_unique_sulfuras", sampleItem.Icon); 69 | Assert.AreEqual(1, sampleItem.Stackable); 70 | Assert.AreEqual(1, sampleItem.ItemBind); 71 | 72 | Assert.AreEqual("CREATED_BY_SPELL", sampleItem.ItemSource.SourceType); 73 | 74 | Assert.AreEqual(3.7, sampleItem.WeaponInfo.WeaponSpeed); 75 | 76 | Assert.AreEqual(19, sampleItem.BonusStats.ElementAt(2).Amount); 77 | Assert.AreEqual("Hurls a fiery ball that causes ^7.7376 Fire damage and an additional ^1.9145 damage over 10 sec.", 78 | sampleItem.ItemSpells.First().Spell.Description); 79 | } 80 | 81 | [TestMethod] 82 | public void Get_Sample_Gem_52210() 83 | { 84 | var sampleItem = explorer.GetItem(52210); 85 | 86 | Assert.AreEqual("+8 Parry and +4 Stamina", sampleItem.GemInfo.Bonus.Name); 87 | Assert.AreEqual("PURPLE", sampleItem.GemInfo.Type.Color); 88 | Assert.AreEqual(sampleItem.Id, sampleItem.GemInfo.Bonus.SourceItemId); 89 | Assert.AreEqual(0, sampleItem.GemInfo.Bonus.RequiredSkillRank); 90 | Assert.AreEqual(0, sampleItem.GemInfo.Bonus.MinLevel); 91 | Assert.AreEqual(290, sampleItem.GemInfo.Bonus.ItemLevel); 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /Explorers.Test/MountTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | 7 | namespace WowDotNetAPI.Explorers.Test 8 | { 9 | [TestClass] 10 | public class MountTests 11 | { 12 | private static WowExplorer explorer; 13 | private static string APIKey = TestStrings.APIKey; 14 | 15 | [ClassInitialize] 16 | public static void ClassInit(TestContext context) 17 | { 18 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 19 | } 20 | 21 | [TestMethod] 22 | public void Get_Mount_List() 23 | { 24 | var mounts = explorer.GetMounts(); 25 | Assert.IsTrue(mounts.Any()); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Explorers.Test/PetTests.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using WowDotNetAPI.Models; 4 | 5 | namespace WowDotNetAPI.Explorers.Test 6 | { 7 | [TestClass] 8 | public class PetTests 9 | { 10 | private static WowExplorer explorer; 11 | private static string APIKey = TestStrings.APIKey; 12 | 13 | [ClassInitialize] 14 | public static void ClassInit(TestContext context) 15 | { 16 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 17 | } 18 | 19 | [TestMethod] 20 | public void Get_Pet_List() 21 | { 22 | var pets = explorer.GetPets(); 23 | Assert.IsTrue(pets.Any()); 24 | } 25 | 26 | [TestMethod] 27 | public void Get_Pet_Ability_Details() 28 | { 29 | var ability = explorer.GetPetAbilityDetails(640); 30 | Assert.IsNotNull(ability); 31 | } 32 | 33 | [TestMethod] 34 | public void Get_Pet_Species() 35 | { 36 | var species = explorer.GetPetSpeciesDetails(258); 37 | Assert.IsNotNull(species); 38 | } 39 | 40 | [TestMethod] 41 | public void Get_Pet_Stats() 42 | { 43 | var stats = explorer.GetPetStats(258, 25, 5, 4); 44 | Assert.IsNotNull(stats); 45 | } 46 | 47 | [TestMethod] 48 | public void Get_Pet_Types() 49 | { 50 | var types = explorer.GetPetTypes(); 51 | Assert.IsTrue(types.Any()); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Explorers.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RealmAPI.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("RealmAPI.Test")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ac94033a-eb4c-4e70-8d34-12b894daa49c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Explorers.Test/QuestTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | 7 | namespace WowDotNetAPI.Explorers.Test 8 | { 9 | [TestClass] 10 | public class QuestTests 11 | { 12 | private static WowExplorer explorer; 13 | private static string APIKey = TestStrings.APIKey; 14 | 15 | [ClassInitialize] 16 | public static void ClassInit(TestContext context) 17 | { 18 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 19 | } 20 | 21 | [TestMethod] 22 | public void Get_Quest_Data() 23 | { 24 | var questData = explorer.GetQuestData(13146); 25 | Assert.IsNotNull(questData); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Explorers.Test/RealmTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Linq; 4 | using Microsoft.VisualStudio.TestTools.UnitTesting; 5 | using System.Net; 6 | using System.Collections.Generic; 7 | using System.Web.Script.Serialization; 8 | using WowDotNetAPI; 9 | using WowDotNetAPI.Models; 10 | using WowDotNetAPI.Test; 11 | using WowDotNetAPI.Utilities; 12 | using WowDotNetAPI.Explorers.Test; 13 | 14 | namespace Explorers.Test 15 | { 16 | [TestClass] 17 | public class RealmTests 18 | { 19 | private static WowExplorer explorer; 20 | private static string APIKey = TestStrings.APIKey; 21 | 22 | [ClassInitialize] 23 | public static void ClassInit(TestContext context) 24 | { 25 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 26 | } 27 | 28 | [TestMethod] 29 | public void GetAll_US_Realms_Returns_All_Realms() 30 | { 31 | var realmList = explorer.GetRealms(); 32 | Assert.IsTrue(realmList.Any()); 33 | } 34 | 35 | [TestMethod] 36 | public void Get_Valid_US_Realm_Returns_Unique_Realm() 37 | { 38 | var realm = explorer.GetRealms().Where(r => r.Name.Equals("skullcrusher", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault(); 39 | Assert.IsNotNull(realm); 40 | Assert.IsTrue(realm.Name == "Skullcrusher"); 41 | Assert.IsTrue(realm.Type == RealmType.PVP); 42 | Assert.IsTrue(realm.Slug == "skullcrusher"); 43 | } 44 | 45 | [TestMethod] 46 | public void Get_All_Realms_By_Type_Returns_Pvp_Realms() 47 | { 48 | var realms = explorer.GetRealms().Where(r => r.Type == RealmType.PVP); 49 | var allCollectedRealmsArePvp = realms.Any() && realms.All(r => r.Type == RealmType.PVP); 50 | Assert.IsTrue(allCollectedRealmsArePvp); 51 | } 52 | 53 | [TestMethod] 54 | public void Get_All_Realms_By_Status_Returns_Realms_That_Are_Up() 55 | { 56 | var realmList = explorer.GetRealms().Where(r => r.Status == true); 57 | //All servers being down is likely(maintenance) and will cause test to fail 58 | var allCollectedRealmsAreUp = realmList.Any() && realmList.All(r => r.Status == true); 59 | Assert.IsTrue(allCollectedRealmsAreUp); 60 | } 61 | 62 | 63 | [TestMethod] 64 | public void Get_All_Realms_By_Queue_Returns_Realms_That_Do_Not_Have_Queues() 65 | { 66 | var realmList = explorer.GetRealms().Where(r => r.Queue == false); 67 | //All servers getting queues is unlikely but possible and will cause test to fail 68 | var allCollectedRealmsHaveQueues = realmList.Any() && realmList.All(r => r.Queue == false); 69 | Assert.IsTrue(allCollectedRealmsHaveQueues); 70 | } 71 | 72 | [TestMethod] 73 | public void Get_All_Realms_By_Population_Returns_Realms_That_Have_Low_Population() 74 | { 75 | var realmList = explorer.GetRealms().Where(r => r.population == "low"); 76 | var allCollectedRealmsHaveLowPopulation = realmList.Any() && realmList.All(r => r.population == "low"); 77 | Assert.IsTrue(allCollectedRealmsHaveLowPopulation); 78 | } 79 | 80 | 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Explorers.Test/RecipeTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | 7 | namespace WowDotNetAPI.Explorers.Test 8 | { 9 | [TestClass] 10 | public class RecipeTests 11 | { 12 | private static WowExplorer explorer; 13 | private static string APIKey = TestStrings.APIKey; 14 | 15 | [ClassInitialize] 16 | public static void ClassInit(TestContext context) 17 | { 18 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 19 | } 20 | 21 | [TestMethod] 22 | public void Get_Recipe_Data() 23 | { 24 | var recipe = explorer.GetRecipeData(33994); 25 | Assert.IsNotNull(recipe); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Explorers.Test/SpellTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | 7 | namespace WowDotNetAPI.Explorers.Test 8 | { 9 | [TestClass] 10 | class SpellTests 11 | { 12 | private static WowExplorer explorer; 13 | private static string APIKey = TestStrings.APIKey; 14 | 15 | [ClassInitialize] 16 | public static void ClassInit(TestContext context) 17 | { 18 | explorer = new WowExplorer(Region.US, Locale.en_US, APIKey); 19 | } 20 | 21 | [TestMethod] 22 | public void Get_Spell_Data() 23 | { 24 | var spell = explorer.GetSpellData(8056); 25 | Assert.IsNotNull(spell); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Explorers.Test/TestStrings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace WowDotNetAPI.Explorers.Test { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class TestStrings { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal TestStrings() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WowDotNetAPI.Explorers.Test.TestStrings", typeof(TestStrings).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized string similar to gfyjawteeb4wbzke674wbwzyjbpcahjv. 65 | /// 66 | internal static string APIKey { 67 | get { 68 | return ResourceManager.GetString("APIKey", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized string similar to { 74 | /// "battlegroups": [{ 75 | /// "name": "Bloodlust", 76 | /// "slug": "bloodlust" 77 | /// }, { 78 | /// "name": "Coliseum 1", 79 | /// "slug": "coliseum-1" 80 | /// }, { 81 | /// "name": "Cyclone", 82 | /// "slug": "cyclone" 83 | /// }, { 84 | /// "name": "Emberstorm", 85 | /// "slug": "emberstorm" 86 | /// }, { 87 | /// "name": "Nightfall", 88 | /// "slug": "nightfall" 89 | /// }, { 90 | /// "name": "Rampage", 91 | /// "slug": "rampage" 92 | /// }, { 93 | /// "name": "Reckoning", 94 | /// "slug": "reckoning" 95 | /// }, { 96 | /// [rest of string was truncated]";. 97 | /// 98 | internal static string TestBattleGroups { 99 | get { 100 | return ResourceManager.GetString("TestBattleGroups", resourceCulture); 101 | } 102 | } 103 | 104 | /// 105 | /// Looks up a localized string similar to {"achievementPoints":6895,"achievements":{"achievementsCompleted":[6,7,8,9,10,11,12,13,31,32,33,35,38,39,44,45,73,116,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,137,141,153,154,159,165,166,168,199,201,204,208,218,220,223,227,229,231,233,238,239,245,246,255,283,288,292,295,397,398,402,403,406,429,431,432,435,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,503,504,505,506,507,508,509,512,513,515,516,518,519,520,521,522,523,524,545,546,547,556,55 [rest of string was truncated]";. 106 | /// 107 | internal static string TestCharacter { 108 | get { 109 | return ResourceManager.GetString("TestCharacter", resourceCulture); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized string similar to {"realms":[{"name":"Aegwynn","population":"low","queue":false,"slug":"aegwynn","status":true,"type":"pvp"},{"name":"Aerie Peak","population":"medium","queue":false,"slug":"aerie-peak","status":true,"type":"pve"},{"name":"Agamaggan","population":"low","queue":false,"slug":"agamaggan","status":true,"type":"pvp"},{"name":"Aggramar","population":"medium","queue":false,"slug":"aggramar","status":true,"type":"pve"},{"name":"Akama","population":"medium","queue":false,"slug":"akama","status":true,"type":"pvp"},{&q.... 115 | /// 116 | internal static string TestRealms { 117 | get { 118 | return ResourceManager.GetString("TestRealms", resourceCulture); 119 | } 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /Explorers.Test/TestUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using WowDotNetAPI.Models; 7 | using WowDotNetAPI.Utilities; 8 | 9 | namespace WowDotNetAPI.Test 10 | { 11 | [TestClass] 12 | public class TestUtility 13 | { 14 | //Assert.ThrowException 15 | public static void ThrowsException(Action action, string expectedMessage) where T : Exception 16 | { 17 | try 18 | { 19 | action.Invoke(); 20 | Assert.Fail("Exception of type {0} should be thrown", typeof(T)); 21 | } 22 | catch (T e) 23 | { 24 | Assert.AreEqual(expectedMessage, e.Message); 25 | } 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Explorers/Explorers.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9} 9 | Library 10 | Properties 11 | WowDotNetAPI 12 | WowDotNetAPI 13 | v4.0 14 | 512 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | false 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 186 | -------------------------------------------------------------------------------- /Explorers/Explorers.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WowDotNetAPI 5 | 4.0.8 6 | jsassner mjdean1994 Dramacydal Mythos Eadie Briandek 7 | briandek 8 | https://opensource.org/licenses/MIT 9 | https://github.com/briandek/WowDotNetAPI 10 | false 11 | .NET library for the World of Warcraft Community Platform. Requires Mashery API key. 12 | Legion Updates 13 | Copyright 2015 14 | World-of-Warcraft WoW Community-Platform-API 15 | 16 | -------------------------------------------------------------------------------- /Explorers/IExplorer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Net; 6 | using WowDotNetAPI.Models; 7 | using System.Runtime.Serialization.Json; 8 | using WowDotNetAPI.Utilities; 9 | 10 | namespace WowDotNetAPI 11 | { 12 | public interface IExplorer 13 | { 14 | Character GetCharacter(string realm, string name); 15 | Character GetCharacter(string realm, string name, CharacterOptions characterOptions); 16 | 17 | Character GetCharacter(Region region, string realm, string name); 18 | Character GetCharacter(Region region, string realm, string name, CharacterOptions characterOptions); 19 | 20 | Guild GetGuild(string realm, string name); 21 | Guild GetGuild(string realm, string name, GuildOptions guildOptions); 22 | 23 | Guild GetGuild(Region region, string realm, string name); 24 | Guild GetGuild(Region region, string realm, string name, GuildOptions guildOptions); 25 | 26 | AchievementInfo GetAchievement(int id); 27 | 28 | IEnumerable GetAchievements(); 29 | IEnumerable GetGuildAchievements(); 30 | 31 | IEnumerable GetBattlegroupsData(); 32 | 33 | IEnumerable GetItemClasses(); 34 | 35 | IEnumerable GetRealms(); 36 | 37 | Auctions GetAuctions(string realm); 38 | 39 | Item GetItem(int id); 40 | 41 | IEnumerable GetCharacterRaces(); 42 | 43 | IEnumerable GetCharacterClasses(); 44 | 45 | IEnumerable GetGuildRewards(); 46 | 47 | IEnumerable GetGuildPerks(); 48 | 49 | Challenges GetChallenges(string realm); 50 | 51 | Leaderboard GetLeaderBoards(Bracket bracket); 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Explorers/Models/AchievementCategory.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class AchievementCategory 8 | { 9 | [DataMember(Name = "id")] 10 | public int Id { get; set; } 11 | 12 | [DataMember(Name = "achievements")] 13 | public IEnumerable Achievements { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Explorers/Models/AchievementCriteria.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class AchievementCriteria 7 | { 8 | [DataMember(Name = "id")] 9 | public int Id { get; set; } 10 | 11 | [DataMember(Name = "description")] 12 | public string Description { get; set; } 13 | 14 | [DataMember(Name = "orderIndex")] 15 | public int OrderIndex { get; set; } 16 | 17 | [DataMember(Name = "max")] 18 | public int Max { get; set; } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Explorers/Models/AchievementData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class AchievementData 8 | { 9 | [DataMember(Name = "achievements")] 10 | public IEnumerable Lists { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Explorers/Models/AchievementInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class AchievementInfo 8 | { 9 | [DataMember(Name = "id")] 10 | public int Id { get; set; } 11 | 12 | [DataMember(Name = "title")] 13 | public string Title { get; set; } 14 | 15 | [DataMember(Name = "points")] 16 | public int Points { get; set; } 17 | 18 | [DataMember(Name = "description")] 19 | public string Description { get; set; } 20 | 21 | [DataMember(Name = "reward")] 22 | public string Reward { get; set; } 23 | 24 | [DataMember(Name = "rewardItems")] 25 | public IEnumerable RewardItems { get; set; } 26 | 27 | [DataMember(Name = "icon")] 28 | public string Icon { get; set; } 29 | 30 | [DataMember(Name = "criteria")] 31 | public IEnumerable Criteria { get; set; } 32 | 33 | [DataMember(Name = "accountWide")] 34 | public bool AccountWide { get; set; } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Explorers/Models/AchievementList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class AchievementList 8 | { 9 | [DataMember(Name = "id")] 10 | public int Id { get; set; } 11 | 12 | [DataMember(Name = "achievements")] 13 | public IEnumerable Achievements { get; set; } 14 | 15 | [DataMember(Name = "categories")] 16 | public IEnumerable Categories { get; set; } 17 | 18 | [DataMember(Name = "name")] 19 | public string Name { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Explorers/Models/AchievementReward.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class AchievementReward 7 | { 8 | [DataMember(Name = "id")] 9 | public int Id { get; set; } 10 | 11 | [DataMember(Name = "name")] 12 | public string Description { get; set; } 13 | 14 | [DataMember(Name = "icon")] 15 | public string Icon { get; set; } 16 | 17 | [DataMember(Name = "quality")] 18 | public int Quality { get; set; } 19 | 20 | [DataMember(Name = "tooltipParams")] 21 | public ItemTooltipParameters TooltipParams { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Explorers/Models/Achievements.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Achievements 11 | { 12 | [DataMember(Name = "achievementsCompleted")] 13 | public IEnumerable AchievementsCompleted { get; set; } 14 | 15 | [DataMember(Name = "achievementsCompletedTimestamp")] 16 | public IEnumerable AchievementsCompletedTimestamp { get; set; } 17 | 18 | [DataMember(Name = "criteria")] 19 | public IEnumerable Criteria { get; set; } 20 | 21 | [DataMember(Name = "criteriaQuantity")] 22 | public IEnumerable CriteriaQuantity { get; set; } 23 | 24 | [DataMember(Name = "criteriaTimestamp")] 25 | public IEnumerable CriteriaTimestamp { get; set; } 26 | 27 | [DataMember(Name = "criteriaCreated")] 28 | public IEnumerable CriteriaCreated { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Explorers/Models/Auction.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class Auction 7 | { 8 | [DataMember(Name = "auc")] 9 | public int Id { get; set; } 10 | [DataMember(Name = "item")] 11 | public long ItemId { get; set; } 12 | [DataMember(Name = "owner")] 13 | public string Owner { get; set; } 14 | [DataMember(Name = "bid")] 15 | public long Bid { get; set; } 16 | [DataMember(Name = "buyout")] 17 | public long Buyout { get; set; } 18 | [DataMember(Name = "quantity")] 19 | public int Quantity { get; set; } 20 | [DataMember(Name = "timeLeft")] 21 | public string TimeLeft { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /Explorers/Models/AuctionFile.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class AuctionFile 7 | { 8 | [DataMember(Name = "url")] 9 | public string URL { get; set; } 10 | [DataMember(Name = "lastModified")] 11 | public long LastModified { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Explorers/Models/AuctionFiles.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class AuctionFiles 8 | { 9 | [DataMember(Name = "files")] 10 | public IEnumerable Files { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Explorers/Models/AuctionHouseSide.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | [Obsolete("With Warlords of Draaenor, auction houses are merged. This class only adds convolution.", true)] 11 | public class AuctionHouseSide 12 | { 13 | [DataMember(Name = "auctions")] 14 | public IEnumerable Auctions { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Explorers/Models/Auctions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Auctions 11 | { 12 | [DataMember(Name = "realm")] 13 | public Realm Realm { get; set; } 14 | [DataMember(Name = "auctions")] 15 | public IEnumerable CurrentAuctions { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Explorers/Models/BattlegroupData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class BattlegroupData 8 | { 9 | [DataMember(Name = "battlegroups")] 10 | public IEnumerable Battlegroups { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Explorers/Models/BattlegroupInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class BattlegroupInfo 7 | { 8 | [DataMember(Name = "name")] 9 | public string Name { get; set; } 10 | 11 | [DataMember(Name = "slug")] 12 | public string Slug { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Explorers/Models/Challenge.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Challenge 11 | { 12 | [DataMember(Name = "groups")] 13 | public IEnumerable Groups { get; set; } 14 | 15 | [DataMember(Name = "map")] 16 | public ChallengeMap Map { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Explorers/Models/ChallengeGroup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ChallengeGroup 11 | { 12 | [DataMember(Name = "date")] 13 | public string Date { get; set; } 14 | 15 | [DataMember(Name = "faction")] 16 | public string Faction { get; set; } 17 | 18 | [DataMember(Name = "isRecurring")] 19 | public bool IsRecurring { get; set; } 20 | 21 | [DataMember(Name = "medal")] 22 | public string Medal { get; set; } 23 | 24 | [DataMember(Name = "members")] 25 | public IEnumerable Members { get; set; } 26 | 27 | [DataMember(Name = "ranking")] 28 | public int Ranking { get; set; } 29 | 30 | [DataMember(Name = "time")] 31 | public ChallengeTime Time { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Explorers/Models/ChallengeMap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ChallengeMap 11 | { 12 | [DataMember(Name = "goldCriteria")] 13 | public ChallengeTime GoldCriteria { get; set; } 14 | 15 | [DataMember(Name = "silverCriteria")] 16 | public ChallengeTime SilverCriteria { get; set; } 17 | 18 | [DataMember(Name = "bronzeCriteria")] 19 | public ChallengeTime BronzeCriteria { get; set; } 20 | 21 | [DataMember(Name = "id")] 22 | public int Id { get; set; } 23 | 24 | [DataMember(Name = "hasChallengeMode")] 25 | public bool HasChallengeMode { get; set; } 26 | 27 | [DataMember(Name = "name")] 28 | public string Name { get; set; } 29 | 30 | [DataMember(Name = "slug")] 31 | public string Slug { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Explorers/Models/ChallengeMember.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ChallengeMember 11 | { 12 | [DataMember(Name = "character")] 13 | public ChallengeMemberCharacter Character { get; set; } 14 | 15 | [DataMember(Name = "spec")] 16 | public CharacterTalentSpec Spec { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Explorers/Models/ChallengeMemberCharacter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | 10 | [DataContract] 11 | public class ChallengeMemberCharacter 12 | { 13 | [DataMember(Name = "name")] 14 | public string Name { get; set; } 15 | 16 | [DataMember(Name = "realm")] 17 | public string Realm { get; set; } 18 | 19 | [DataMember(Name = "class")] 20 | private int @class { get; set; } 21 | 22 | [DataMember(Name = "race")] 23 | private int race { get; set; } 24 | 25 | [DataMember(Name = "gender")] 26 | private int gender { get; set; } 27 | 28 | [DataMember(Name = "level")] 29 | public int Level { get; set; } 30 | 31 | [DataMember(Name = "achievementPoints")] 32 | public int AchievementPoints { get; set; } 33 | 34 | [DataMember(Name = "thumbnail")] 35 | public string Thumbnail { get; set; } 36 | 37 | [DataMember(Name = "guild")] 38 | public string Guild { get; set; } 39 | 40 | [DataMember(Name = "battlegroup")] 41 | public string Battlegroup { get; set; } 42 | 43 | 44 | public CharacterClass Class { get { return (CharacterClass)Enum.Parse(typeof(CharacterClass), Enum.GetName(typeof(CharacterClass), @class).Replace(' ', '_')); } } 45 | public CharacterRace @Race { get { return (CharacterRace)Enum.Parse(typeof(CharacterRace), Enum.GetName(typeof(CharacterRace), race).Replace(' ', '_')); } } 46 | public CharacterGender Gender { get { return (CharacterGender)Enum.Parse(typeof(CharacterGender), Enum.GetName(typeof(CharacterGender), gender).Replace(' ', '_')); } } 47 | 48 | //TODO: cleanup 49 | //probably better to override equality operators http://msdn.microsoft.com/en-us/library/ms173147.aspx 50 | public int CompareTo(Character other) 51 | { 52 | if (Name == other.Name 53 | && Realm == other.Realm 54 | && Class == other.Class 55 | && Race == other.Race 56 | && Gender == other.Gender) 57 | { 58 | return 0; 59 | } 60 | 61 | return -1; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Explorers/Models/ChallengeTime.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ChallengeTime 11 | { 12 | [DataMember(Name = "hours")] 13 | public int Hours { get; set; } 14 | 15 | [DataMember(Name = "minutes")] 16 | public int Minutes { get; set; } 17 | 18 | [DataMember(Name = "seconds")] 19 | public int Seconds { get; set; } 20 | 21 | [DataMember(Name = "milliseconds")] 22 | public int Milliseconds { get; set; } 23 | 24 | [DataMember(Name = "time")] 25 | public long Time { get; set; } 26 | 27 | public string TimeString 28 | { 29 | get 30 | { 31 | string tmp = Seconds + "." + Milliseconds + "s"; 32 | 33 | if (Minutes > 0 || Hours > 0) { tmp = Minutes + "m " + tmp; }; 34 | if (Hours > 0) { tmp += Hours + "h " + tmp; }; 35 | 36 | return tmp; 37 | } 38 | } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Explorers/Models/Challenges.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Challenges 11 | { 12 | [DataMember(Name = "challenge")] 13 | public IEnumerable Challenge { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/Character.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public enum CharacterClass 11 | { 12 | WARRIOR = 1, 13 | PALADIN = 2, 14 | HUNTER = 3, 15 | ROGUE = 4, 16 | PRIEST = 5, 17 | DEATH_KNIGHT = 6, 18 | SHAMAN = 7, 19 | MAGE = 8, 20 | WARLOCK = 9, 21 | MONK = 10, 22 | DRUID = 11, 23 | DEMONHUNTER = 12 24 | } 25 | 26 | [DataContract] 27 | public enum CharacterRace 28 | { 29 | HUMAN = 1, 30 | ORC = 2, 31 | DWARF = 3, 32 | NIGHT_ELF = 4, 33 | UNDEAD = 5, 34 | TAUREN = 6, 35 | GNOME = 7, 36 | TROLL = 8, 37 | GOBLIN = 9, 38 | BLOOD_ELF = 10, 39 | DRAENEI = 11, 40 | WORGEN = 22, 41 | PANDAREN_NEUTRAL = 24, 42 | PANDAREN_ALLIANCE = 25, 43 | PANDAREN_HORDE = 26 44 | } 45 | 46 | [DataContract] 47 | public enum CharacterGender 48 | { 49 | MALE = 0, 50 | FEMALE = 1, 51 | } 52 | 53 | [DataContract] 54 | public class Character : IComparable 55 | { 56 | [DataMember(Name = "lastModified")] 57 | public string LastModified { get; set; } 58 | 59 | [DataMember(Name = "name")] 60 | public string Name { get; set; } 61 | 62 | [DataMember(Name = "realm")] 63 | public string Realm { get; set; } 64 | 65 | [DataMember(Name = "class")] 66 | private int @class { get; set; } 67 | 68 | [DataMember(Name = "race")] 69 | private int race { get; set; } 70 | 71 | [DataMember(Name = "gender")] 72 | private int gender { get; set; } 73 | 74 | [DataMember(Name = "level")] 75 | public int Level { get; set; } 76 | 77 | [DataMember(Name = "achievementPoints")] 78 | public int AchievementPoints { get; set; } 79 | 80 | [DataMember(Name = "calcClass")] 81 | public char CalcClass { get; set; } 82 | 83 | [DataMember(Name = "thumbnail")] 84 | public string Thumbnail { get; set; } 85 | 86 | [DataMember(Name = "guild")] 87 | public CharacterGuild Guild { get; set; } 88 | 89 | [DataMember(Name = "stats")] 90 | public CharacterStats Stats { get; set; } 91 | 92 | [DataMember(Name = "talents")] 93 | public IEnumerable Talents { get; set; } 94 | 95 | [DataMember(Name = "items")] 96 | public CharacterEquipment Items { get; set; } 97 | 98 | [DataMember(Name = "reputation")] 99 | public IEnumerable Reputation { get; set; } 100 | 101 | [DataMember(Name = "titles")] 102 | public IEnumerable Titles { get; set; } 103 | 104 | [DataMember(Name = "professions")] 105 | public CharacterProfessions Professions { get; set; } 106 | 107 | [DataMember(Name = "achievements")] 108 | public Achievements Achievements { get; set; } 109 | 110 | [DataMember(Name = "appearance")] 111 | public CharacterAppearance Appearance { get; set; } 112 | 113 | [DataMember(Name = "mounts")] 114 | public CharacterMounts Mounts { get; set; } 115 | 116 | [DataMember(Name = "hunterPets")] 117 | public IEnumerable HunterPets { get; set; } 118 | 119 | [DataMember(Name = "pets")] 120 | public CharacterPets Pets { get; set; } 121 | 122 | [DataMember(Name = "petSlots")] 123 | public IEnumerable PetSlots { get; set; } 124 | 125 | [DataMember(Name = "progression")] 126 | public Progression Progression { get; set; } 127 | 128 | [DataMember(Name = "feed")] 129 | public IEnumerable Feed { get; set; } 130 | 131 | [DataMember(Name = "pvp")] 132 | public CharacterPvP PvP { get; set; } 133 | 134 | [DataMember(Name = "quests")] 135 | public IEnumerable Quests { get; set; } 136 | 137 | [DataMember(Name = "statistics")] 138 | public CharacterStatistics Statistics { get; set; } 139 | 140 | [DataMember(Name = "totalHonorableKills")] 141 | public int TotalHonorableKills { get; set; } 142 | 143 | public CharacterClass Class { get { return (CharacterClass)Enum.Parse(typeof(CharacterClass), Enum.GetName(typeof(CharacterClass), @class).Replace(' ', '_')); } } 144 | public CharacterRace @Race { get { return (CharacterRace)Enum.Parse(typeof(CharacterRace), Enum.GetName(typeof(CharacterRace), race).Replace(' ', '_')); } } 145 | public CharacterGender Gender { get { return (CharacterGender)Enum.Parse(typeof(CharacterGender), Enum.GetName(typeof(CharacterGender), gender).Replace(' ', '_')); } } 146 | 147 | //TODO: cleanup 148 | //probably better to override equality operators http://msdn.microsoft.com/en-us/library/ms173147.aspx 149 | public int CompareTo(Character other) 150 | { 151 | if (Name == other.Name 152 | && Realm == other.Realm 153 | && Class == other.Class 154 | && Race == other.Race 155 | && Gender == other.Gender) 156 | { 157 | return 0; 158 | } 159 | 160 | return -1; 161 | } 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterAppearance.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterAppearance 11 | { 12 | [DataMember(Name = "faceVariation")] 13 | public int FaceVariation { get; set; } 14 | 15 | [DataMember(Name = "skinColor")] 16 | public int SkinColor { get; set; } 17 | 18 | [DataMember(Name = "hairVariation")] 19 | public int HairVariation { get; set; } 20 | 21 | [DataMember(Name = "hairColor")] 22 | public int HairColor { get; set; } 23 | 24 | [DataMember(Name = "featureVariation")] 25 | public int FeatureVariation { get; set; } 26 | 27 | [DataMember(Name = "showHelm")] 28 | public bool ShowHelm { get; set; } 29 | 30 | [DataMember(Name = "showCloak")] 31 | public bool ShowCloak { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterArenaTeam.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterArenaTeam 11 | { 12 | [DataMember(Name = "name")] 13 | public string Name { get; set; } 14 | 15 | [DataMember(Name = "personalRating")] 16 | public int PersonalRating { get; set; } 17 | 18 | [DataMember(Name = "teamRating")] 19 | public int TeamRating { get; set; } 20 | 21 | [DataMember(Name = "size")] 22 | public string Size { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterClassInfo.cs: -------------------------------------------------------------------------------- 1 |  using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public enum CharacterPowerType 11 | { 12 | [EnumMember(Value = "focus")] 13 | FOCUS, 14 | [EnumMember(Value = "rage")] 15 | RAGE, 16 | [EnumMember(Value = "mana")] 17 | MANA, 18 | [EnumMember(Value = "energy")] 19 | ENERGY, 20 | [EnumMember(Value = "runic-power")] 21 | RUNICPOWER 22 | } 23 | 24 | [DataContract] 25 | public class CharacterClassInfo 26 | { 27 | [DataMember(Name = "id")] 28 | public int Id { get; set; } 29 | 30 | [DataMember(Name = "mask")] 31 | public int Mask { get; set; } 32 | 33 | [DataMember(Name = "powerType")] 34 | private string powerType { get; set; } 35 | 36 | [DataMember(Name = "name")] 37 | public string Name { get; set; } 38 | 39 | public CharacterPowerType PowerType { get { return (CharacterPowerType)Enum.Parse(typeof(CharacterPowerType), powerType.Replace("-", string.Empty), true); } } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterClassesData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterClassesData 11 | { 12 | [DataMember(Name = "classes")] 13 | public IEnumerable Classes { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterEquipment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterEquipment 11 | { 12 | [DataMember(Name="averageItemLevel")] 13 | public int AverageItemLevel { get; set; } 14 | 15 | [DataMember(Name = "averageItemLevelEquipped")] 16 | public int AverageItemLevelEquipped { get; set; } 17 | 18 | [DataMember(Name = "head")] 19 | public CharacterItem Head { get; set; } 20 | 21 | [DataMember(Name = "neck")] 22 | public CharacterItem Neck { get; set; } 23 | 24 | [DataMember(Name = "shoulder")] 25 | public CharacterItem Shoulder { get; set; } 26 | 27 | [DataMember(Name = "back")] 28 | public CharacterItem Back { get; set; } 29 | 30 | [DataMember(Name = "chest")] 31 | public CharacterItem Chest { get; set; } 32 | 33 | [DataMember(Name = "shirt")] 34 | public CharacterItem Shirt { get; set; } 35 | 36 | [DataMember(Name = "tabard")] 37 | public CharacterItem Tabard { get; set; } 38 | 39 | [DataMember(Name = "wrist")] 40 | public CharacterItem Wrist { get; set; } 41 | 42 | [DataMember(Name = "hands")] 43 | public CharacterItem Hands { get; set; } 44 | 45 | [DataMember(Name = "waist")] 46 | public CharacterItem Waist { get; set; } 47 | 48 | [DataMember(Name = "legs")] 49 | public CharacterItem Legs { get; set; } 50 | 51 | [DataMember(Name = "feet")] 52 | public CharacterItem Feet { get; set; } 53 | 54 | [DataMember(Name = "finger1")] 55 | public CharacterItem Finger1 { get; set; } 56 | 57 | [DataMember(Name = "finger2")] 58 | public CharacterItem Finger2 { get; set; } 59 | 60 | [DataMember(Name = "trinket1")] 61 | public CharacterItem Trinket1 { get; set; } 62 | 63 | [DataMember(Name = "trinket2")] 64 | public CharacterItem Trinket2 { get; set; } 65 | 66 | [DataMember(Name = "mainHand")] 67 | public CharacterItem MainHand { get; set; } 68 | 69 | [DataMember(Name = "offHand")] 70 | public CharacterItem OffHand { get; set; } 71 | 72 | [DataMember(Name = "ranged")] 73 | public CharacterItem Ranged { get; set; } 74 | 75 | public CharacterItem[] ToArray() 76 | { 77 | return new [] 78 | { 79 | Head, 80 | Neck, 81 | Shoulder, 82 | Back, 83 | Chest, 84 | Shirt, 85 | Tabard, 86 | Wrist, 87 | Hands, 88 | Waist, 89 | Legs, 90 | Feet, 91 | Finger1, 92 | Finger2, 93 | Trinket1, 94 | Trinket2, 95 | MainHand, 96 | OffHand, 97 | Ranged 98 | }; 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterFeed.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterFeed 11 | { 12 | [DataMember(Name = "type")] 13 | public string Type { get; set; } 14 | 15 | [DataMember(Name = "timestamp")] 16 | public long Timestamp { get; set; } 17 | 18 | [DataMember(Name = "achievement")] 19 | public AchievementInfo Achievement { get; set; } 20 | 21 | [DataMember(Name = "featOfStrength")] 22 | public bool FeatOfStrength { get; set; } 23 | 24 | [DataMember(Name = "criteria")] 25 | public AchievementCriteria Criteria { get; set; } 26 | 27 | [DataMember(Name = "quantity")] 28 | public int Quantity { get; set; } 29 | 30 | [DataMember(Name = "name")] 31 | public string Name { get; set; } 32 | 33 | [DataMember(Name = "itemId")] 34 | public int ItemId { get; set; } 35 | 36 | [DataMember(Name = "context")] 37 | public string Context { get; set; } 38 | 39 | [DataMember(Name = "bonusLists")] 40 | public int[] BonusLists { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterGuild.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | 8 | namespace WowDotNetAPI.Models 9 | { 10 | [DataContract] 11 | public class CharacterGuild 12 | { 13 | [DataMember(Name="name")] 14 | public string Name { get; set; } 15 | 16 | [DataMember(Name = "realm")] 17 | public string Realm { get; set; } 18 | 19 | [DataMember(Name = "level")] 20 | public int Level { get; set; } 21 | 22 | [DataMember(Name = "achievementPoints")] 23 | public int AchievementPoints { get; set; } 24 | 25 | [DataMember(Name = "members")] 26 | public int Members { get; set; } 27 | 28 | [DataMember(Name = "emblem")] 29 | public CharacterGuildEmblem Emblem { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterGuildEmblem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterGuildEmblem 11 | { 12 | [DataMember(Name="icon")] 13 | public int Icon { get; set; } 14 | 15 | [DataMember(Name = "iconColor")] 16 | public string IconColor { get; set; } 17 | 18 | [DataMember(Name = "border")] 19 | public int Border { get; set; } 20 | 21 | [DataMember(Name = "borderColor")] 22 | public string BorderColor { get; set; } 23 | 24 | [DataMember(Name = "backgroundcolor")] 25 | public string Backgroundcolor { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterHunterPet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterHunterPet 11 | { 12 | [DataMember(Name = "calcSpec")] 13 | public string CalcSpec { get; set; } 14 | 15 | [DataMember(Name = "creature")] 16 | public long Creature { get; set; } 17 | 18 | [DataMember(Name = "familyId")] 19 | public int FamilyId { get; set; } 20 | 21 | [DataMember(Name = "familyName")] 22 | public string FamilyName { get; set; } 23 | 24 | [DataMember(Name = "name")] 25 | public string Name { get; set; } 26 | 27 | [DataMember(Name = "selected")] 28 | public bool Selected { get; set; } 29 | 30 | [DataMember(Name = "slot")] 31 | public int Slot { get; set; } 32 | 33 | [DataMember(Name = "spec")] 34 | public CharacterTalentSpec Spec { get; set; } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterItem.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class CharacterItem 8 | { 9 | [DataMember(Name="id")] 10 | public int Id { get; set; } 11 | 12 | [DataMember(Name = "name")] 13 | public string Name { get; set; } 14 | 15 | [DataMember(Name = "icon")] 16 | public string Icon { get; set; } 17 | 18 | [DataMember(Name = "quality")] 19 | public int Quality { get; set; } 20 | 21 | [DataMember(Name = "itemLevel")] 22 | public int ItemLevel { get; set; } 23 | 24 | [DataMember(Name = "tooltipParams")] 25 | public ItemTooltipParameters TooltipParams { get; set; } 26 | 27 | [DataMember(Name = "stats")] 28 | public IEnumerable Stats { get; set; } 29 | 30 | [DataMember(Name = "armor")] 31 | public int Armor { get; set; } 32 | 33 | [DataMember(Name = "context")] 34 | public string Context { get; set; } 35 | 36 | [DataMember(Name = "bonusLists")] 37 | public IEnumerable BonusLists { get; set; } 38 | 39 | // Legion 40 | [DataMember(Name = "artifactId")] 41 | public int ArtifactId { get; set; } 42 | 43 | [DataMember(Name = "artifactTraits")] 44 | public IEnumerable ArtifactTraits { get; set; } 45 | 46 | [DataMember(Name = "relics")] 47 | public IEnumerable Relics { get; set; } 48 | 49 | public override string ToString() 50 | { 51 | return string.Format("{0}", Name); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterItemArtifactTrait.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models { 4 | [DataContract] 5 | public class CharacterItemArtifactTrait { 6 | [DataMember(Name="id")] 7 | public int Id { get; set; } 8 | 9 | [DataMember(Name = "rank")] 10 | public int Rank { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterItemRelic.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models { 5 | [DataContract] 6 | public class CharacterItemRelic { 7 | [DataMember(Name="socket")] 8 | public int Socket { get; set; } 9 | 10 | [DataMember(Name = "itemId")] 11 | public int ItemId { get; set; } 12 | 13 | [DataMember(Name = "context")] 14 | public int Context { get; set; } 15 | 16 | [DataMember(Name = "bonusLists")] 17 | public IEnumerable BonusLists { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterMount.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterMount 11 | { 12 | [DataMember(Name = "creatureId")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "icon")] 16 | public string Icon { get; set; } 17 | 18 | [DataMember(Name = "isAquatic")] 19 | public bool IsAquatic { get; set; } 20 | 21 | [DataMember(Name = "isFlying")] 22 | public bool IsFlying { get; set; } 23 | 24 | [DataMember(Name = "isGround")] 25 | public bool IsGround { get; set; } 26 | 27 | [DataMember(Name = "isJumping")] 28 | public bool IsJumping { get; set; } 29 | 30 | [DataMember(Name = "itemId")] 31 | public int ItemId { get; set; } 32 | 33 | [DataMember(Name = "name")] 34 | public string Name { get; set; } 35 | 36 | [DataMember(Name = "qualityId")] 37 | public int QualityId { get; set; } 38 | 39 | [DataMember(Name = "spellId")] 40 | public int SpellId { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterMounts.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterMounts 11 | { 12 | [DataMember(Name = "numCollected")] 13 | public int NumCollected { get; set; } 14 | 15 | [DataMember(Name = "numNotCollected")] 16 | public int NumNotCollected { get; set; } 17 | 18 | [DataMember(Name = "collected")] 19 | public IEnumerable Collected { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterPVP.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Collections; 6 | using System.Runtime.Serialization; 7 | 8 | namespace WowDotNetAPI.Models 9 | { 10 | [DataContract] 11 | public class CharacterPvP 12 | { 13 | [DataMember(Name = "brackets")] 14 | public CharacterPvPBrackets Brackets { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterPetSlot.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterPetSlot 11 | { 12 | [DataMember(Name = "abilities")] 13 | public IEnumerable Abilities { get; set; } 14 | 15 | [DataMember(Name = "battlePetId")] 16 | public int BattlePetId { get; set; } 17 | 18 | [DataMember(Name = "isEmpty")] 19 | public bool IsEmpty { get; set; } 20 | 21 | [DataMember(Name = "isLocked")] 22 | public bool IsLocked { get; set; } 23 | 24 | [DataMember(Name = "slot")] 25 | public int Slot { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterPets.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterPets 11 | { 12 | [DataMember(Name = "numCollected")] 13 | public int NumCollected { get; set; } 14 | 15 | [DataMember(Name = "numNotCollected")] 16 | public int NumNotCollected { get; set; } 17 | 18 | [DataMember(Name = "collected")] 19 | public IEnumerable Collected { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterProfession.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterProfession 11 | { 12 | [DataMember(Name="id")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | 18 | [DataMember(Name = "icon")] 19 | public string Icon { get; set; } 20 | 21 | [DataMember(Name = "rank")] 22 | public int Rank { get; set; } 23 | 24 | [DataMember(Name = "max")] 25 | public int Max { get; set; } 26 | 27 | [DataMember(Name = "recipes")] 28 | public IEnumerable Recipes { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterProfessions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterProfessions 11 | { 12 | [DataMember(Name="primary")] 13 | public IEnumerable Primary { get; set; } 14 | 15 | [DataMember(Name = "secondary")] 16 | public IEnumerable Secondary { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterPvPBracket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Collections; 6 | using System.Runtime.Serialization; 7 | 8 | namespace WowDotNetAPI.Models 9 | { 10 | [DataContract] 11 | public class CharacterPvPBracket 12 | { 13 | [DataMember(Name = "slug")] 14 | public string Slug { get; set; } 15 | 16 | [DataMember(Name = "rating")] 17 | public int Rating { get; set; } 18 | 19 | [DataMember(Name = "weeklyPlayed")] 20 | public int WeeklyPlayed { get; set; } 21 | 22 | [DataMember(Name = "weeklyWon")] 23 | public int WeeklyWon { get; set; } 24 | 25 | [DataMember(Name = "weeklyLost")] 26 | public int WeeklyLost { get; set; } 27 | 28 | [DataMember(Name = "seasonPlayed")] 29 | public int SeasonPlayed { get; set; } 30 | 31 | [DataMember(Name = "seasonWon")] 32 | public int SeasonWon { get; set; } 33 | 34 | [DataMember(Name = "seasonLost")] 35 | public int SeasonLost { get; set; } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterPvPBrackets.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterPvPBrackets 11 | { 12 | [DataMember(Name = "ARENA_BRACKET_2v2")] 13 | public CharacterPvPBracket ArenaBracket2v2 { get; set; } 14 | 15 | [DataMember(Name = "ARENA_BRACKET_3v3")] 16 | public CharacterPvPBracket ArenaBracket3v3 { get; set; } 17 | 18 | [DataMember(Name = "ARENA_BRACKET_RBG")] 19 | public CharacterPvPBracket ArenaBracketRBG { get; set; } 20 | 21 | [DataMember(Name = "ARENA_BRACKET_2v2_SKIRMISH")] 22 | public CharacterPvPBracket ArenaBracket2v2Skirmish { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterRaceInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterRaceInfo 11 | { 12 | [DataMember(Name="id")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "mask")] 16 | public int Mask { get; set; } 17 | 18 | [DataMember(Name = "side")] 19 | public string Side { get; set; } 20 | 21 | [DataMember(Name = "name")] 22 | public string Name { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterRacesData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterRacesData 11 | { 12 | [DataMember(Name="races")] 13 | public IEnumerable Races { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterRatedBattleground.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterRatedBattleground 11 | { 12 | [DataMember(Name = "name")] 13 | public string Name { get; set; } 14 | 15 | [DataMember(Name = "played")] 16 | public int Played { get; set; } 17 | 18 | [DataMember(Name = "won")] 19 | public int Won { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterRatedBattlegrounds.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterRatedBattlegrounds 11 | { 12 | [DataMember(Name = "personalRating")] 13 | public int PersonalRating { get; set; } 14 | 15 | [DataMember(Name = "battlegrounds")] 16 | public IEnumerable Battlegrounds { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterReputation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | //public enum ReputationStanding 10 | 11 | [DataContract] 12 | public class CharacterReputation 13 | { 14 | [DataMember(Name = "id")] 15 | public int Id { get; set; } 16 | 17 | [DataMember(Name = "name")] 18 | public string Name { get; set; } 19 | 20 | [DataMember(Name = "standing")] 21 | public int Standing { get; set; } 22 | 23 | [DataMember(Name = "value")] 24 | public int Value { get; set; } 25 | 26 | [DataMember(Name = "max")] 27 | public int Max { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterStatisticEntry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | 5 | namespace WowDotNetAPI.Models 6 | { 7 | [DataContract] 8 | public class CharacterStatisticEntry 9 | { 10 | [DataMember(Name = "id")] 11 | public int Id { get; set; } 12 | 13 | [DataMember(Name = "name")] 14 | public string Name { get; set; } 15 | 16 | [DataMember(Name = "quantity")] 17 | public long Quantity { get; set; } 18 | 19 | [DataMember(Name = "lastUpdated")] 20 | public long LastUpdated { get; set; } 21 | 22 | [DataMember(Name = "money")] 23 | public bool Money { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterStatistics.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class CharacterStatistics 8 | { 9 | [DataMember(Name = "id")] 10 | public int Id { get; set; } 11 | 12 | [DataMember(Name = "name")] 13 | public string Name { get; set; } 14 | 15 | [DataMember(Name = "subCategories")] 16 | public IEnumerable SubCategories { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Explorers/Models/CharacterStatisticsSubcategory.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class CharacterStatisticsSubcategory 8 | { 9 | [DataMember(Name = "id")] 10 | public int Id { get; set; } 11 | 12 | [DataMember(Name = "name")] 13 | public string Name { get; set; } 14 | 15 | [DataMember(Name = "statistics")] 16 | public IEnumerable StatisticEntries { get; set; } 17 | 18 | [DataMember(Name = "subCategories")] 19 | public IEnumerable SubCategories { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /Explorers/Models/CharacterStats.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Collections; 6 | using System.Runtime.Serialization; 7 | 8 | namespace WowDotNetAPI.Models 9 | { 10 | [DataContract] 11 | public class CharacterStats : IEnumerable 12 | { 13 | [DataMember(Name = "health")] 14 | public int Health { get; set; } 15 | 16 | [DataMember(Name = "powerType")] 17 | private string _powerType { get; set; } 18 | 19 | [DataMember(Name = "power")] 20 | public int Power { get; set; } 21 | 22 | [DataMember(Name = "str")] 23 | public int Strength { get; set; } 24 | 25 | [DataMember(Name = "agi")] 26 | public int Agility { get; set; } 27 | 28 | [DataMember(Name = "int")] 29 | public int Intellect { get; set; } 30 | 31 | [DataMember(Name = "sta")] 32 | public int Stamina { get; set; } 33 | 34 | [DataMember(Name = "speedRating")] 35 | public double SpeedRating { get; set; } 36 | 37 | [DataMember(Name = "speedRatingBonus")] 38 | public double SpeedRatingBonus { get; set; } 39 | 40 | [DataMember(Name = "crit")] 41 | public double Crit { get; set; } 42 | 43 | [DataMember(Name = "critRating")] 44 | public double CritRating { get; set; } 45 | 46 | [DataMember(Name = "haste")] 47 | public double Haste { get; set; } 48 | 49 | [DataMember(Name = "hasteRating")] 50 | public double HasteRating { get; set; } 51 | 52 | [DataMember(Name = "hasteRatingPercent")] 53 | public double HasteRatingPercent { get; set; } 54 | 55 | [DataMember(Name = "mastery")] 56 | public double Mastery { get; set; } 57 | 58 | [DataMember(Name = "masteryRating")] 59 | public double MasteryRating { get; set; } 60 | 61 | [DataMember(Name = "spr")] 62 | public int Spr { get; set; } 63 | 64 | [DataMember(Name = "bonusArmor")] 65 | public int BonusArmor { get; set; } 66 | 67 | [DataMember(Name = "multistrike")] 68 | public double Multistrike { get; set; } 69 | 70 | [DataMember(Name = "multistrikeRating")] 71 | public double MultistrikeRating { get; set; } 72 | 73 | [DataMember(Name = "multistrikeRatingBonus")] 74 | public double MultistrikeRatingBonus { get; set; } 75 | 76 | [DataMember(Name = "leech")] 77 | public double Leech { get; set; } 78 | 79 | [DataMember(Name = "leechRating")] 80 | public double LeechRating { get; set; } 81 | 82 | [DataMember(Name = "leechRatingBonus")] 83 | public double LeechRatingBonus { get; set; } 84 | 85 | [DataMember(Name = "versatility")] 86 | public int Versatility { get; set; } 87 | 88 | [DataMember(Name = "versatilityDamageDoneBonus")] 89 | public double VersatilityDamageDoneBonus { get; set; } 90 | 91 | [DataMember(Name = "versatilityHealingDoneBonus")] 92 | public double VersatilityHealingDoneBonus { get; set; } 93 | 94 | [DataMember(Name = "versatilityDamageTakenBonus")] 95 | public double VersatilityDamageTakenBonus { get; set; } 96 | 97 | [DataMember(Name = "avoidanceRating")] 98 | public double AvoidanceRating { get; set; } 99 | 100 | [DataMember(Name = "avoidanceRatingBonus")] 101 | public double AvoidanceRatingBonus { get; set; } 102 | 103 | [DataMember(Name = "spellPower")] 104 | public int SpellPower { get; set; } 105 | 106 | [DataMember(Name = "spellPen")] 107 | public int SpellPenetration { get; set; } 108 | 109 | [DataMember(Name = "spellCrit")] 110 | public double SpellCrit { get; set; } 111 | 112 | [DataMember(Name = "spellCritRating")] 113 | public double SpellCritRating { get; set; } 114 | 115 | [DataMember(Name = "mana5")] 116 | public double Mana5 { get; set; } 117 | 118 | [DataMember(Name = "mana5Combat")] 119 | public double Mana5Combat { get; set; } 120 | 121 | [DataMember(Name = "armor")] 122 | public int Armor { get; set; } 123 | 124 | [DataMember(Name = "dodge")] 125 | public double Dodge { get; set; } 126 | 127 | [DataMember(Name = "dodgeRating")] 128 | public int DodgeRating { get; set; } 129 | 130 | [DataMember(Name = "parry")] 131 | public double Parry { get; set; } 132 | 133 | [DataMember(Name = "parryRating")] 134 | public int ParryRating { get; set; } 135 | 136 | [DataMember(Name = "block")] 137 | public double Block { get; set; } 138 | 139 | [DataMember(Name = "blockRating")] 140 | public int BlockRating { get; set; } 141 | 142 | [DataMember(Name = "mainHandDmgMin")] 143 | public double MainHandDmgMin { get; set; } 144 | 145 | [DataMember(Name = "mainHandDmgMax")] 146 | public double MainHandDmgMax { get; set; } 147 | 148 | [DataMember(Name = "mainHandSpeed")] 149 | public double MainHandSpeed { get; set; } 150 | 151 | [DataMember(Name = "mainHandDps")] 152 | public double MainHandDps { get; set; } 153 | 154 | [DataMember(Name = "offHandDmgMin")] 155 | public double OffHandDmgMin { get; set; } 156 | 157 | [DataMember(Name = "offHandDmgMax")] 158 | public double OffHandDmgMax { get; set; } 159 | 160 | [DataMember(Name = "offHandSpeed")] 161 | public double OffHandSpeed { get; set; } 162 | 163 | [DataMember(Name = "offHandDps")] 164 | public double OffHandDps { get; set; } 165 | 166 | [DataMember(Name = "rangedDmgMin")] 167 | public double RangedDmgMin { get; set; } 168 | 169 | [DataMember(Name = "rangedDmgMax")] 170 | public double RangedDmgMax { get; set; } 171 | 172 | [DataMember(Name = "rangedSpeed")] 173 | public double RangedSpeed { get; set; } 174 | 175 | [DataMember(Name = "rangedDps")] 176 | public double RangedDps { get; set; } 177 | 178 | [DataMember(Name = "attackPower")] 179 | public int AttackPower { get; set; } 180 | 181 | [DataMember(Name = "rangedAttackPower")] 182 | public int RangedAttackPower { get; set; } 183 | 184 | 185 | public CharacterPowerType PowerType { get { return (CharacterPowerType)Enum.Parse(typeof(CharacterPowerType), _powerType.Replace("-", string.Empty), true); } } 186 | 187 | //http://stackoverflow.com/questions/1447308/enumerating-through-an-objects-properties-string-in-c 188 | //TODO:REFACTOR THIS / possible performance issue 189 | public IEnumerator GetEnumerator() 190 | { 191 | IEnumerable> tmp = 192 | this.GetType() 193 | .GetProperties() 194 | .Select(pi => new KeyValuePair( pi.Name, pi.GetGetMethod().Invoke(this, null))); 195 | 196 | return tmp.GetEnumerator(); 197 | } 198 | } 199 | } 200 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterTalent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public enum CharacterSpec 11 | { 12 | MAGE_ARCANE = 62, 13 | MAGE_FIRE = 63, 14 | MAKE_FROST = 64, 15 | PALADIN_HOLY = 65, 16 | PALADIN_PROTECTION = 66, 17 | PALADIN_RETRIBUTION = 70, 18 | WARRIOR_ARMS = 71, 19 | WARRIOR_FURY = 72, 20 | WARRIOR_PROTECTION = 73, 21 | PET_FEROCITY = 74, 22 | PET_CUNNING = 79, 23 | PET_TENACITY = 81, 24 | DRUID_BALANCE = 102, 25 | DRUID_FERAL = 103, 26 | DRUID_GUARDIAN = 104, 27 | DRUID_RESTOR = 105, 28 | DK_BLOOD = 250, 29 | DK_FROST = 251, 30 | DK_UNHOLY = 252, 31 | HUNTER_BEASTMASTER = 253, 32 | HUNTER_MARKSMAN = 254, 33 | HUNTER_SURVIVAL = 255, 34 | PRIEST_DISCIPLINE = 256, 35 | PRIEST_HOLY = 257, 36 | PRIEST_SHADOW = 258, 37 | ROGUE_ASSASSINATION = 259, 38 | ROGUE_COMBAT = 260, 39 | ROGUE_SUBTLETY = 261, 40 | SHAMAN_ELEMENTAL = 262, 41 | SHAMAN_ENHANCEMENT = 263, 42 | SHAMAN_RESTORATION = 264, 43 | WARLOCK_AFFLICTION = 265, 44 | WARLOCK_DEMONOLOGY = 266, 45 | WARLOCK_DESTRUCTION = 267, 46 | MONK_BREWMASTER = 268, 47 | MONK_WINDDANCER = 269, 48 | MONK_MISTWEAVER = 270, 49 | ADAPTATION_FEROCITY = 535, 50 | ADAPTATION_CUNNING = 536, 51 | ADAPTATION_TENACITY = 537 52 | } 53 | 54 | [DataContract] 55 | public class CharacterTalent 56 | { 57 | [DataMember(Name = "selected")] 58 | public bool Selected { get; set; } 59 | 60 | [DataMember(Name = "talents")] 61 | public IEnumerable Talents { get; set; } 62 | 63 | [DataMember(Name = "glyphs")] 64 | public CharacterTalentGlyphs Glyphs { get; set; } 65 | 66 | [DataMember(Name = "spec")] 67 | public CharacterTalentSpec Spec { get; set; } 68 | 69 | [DataMember(Name = "calcTalent")] 70 | public string CalcTalent { get; set; } 71 | 72 | [DataMember(Name = "calcSpec")] 73 | public string CalcSpec { get; set; } 74 | 75 | [DataMember(Name = "calcGlyph")] 76 | public string CalcGlyph { get; set; } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterTalentGlyph.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterTalentGlyph 11 | { 12 | [DataMember(Name="glyph")] 13 | public int Glyph { get; set; } 14 | 15 | [DataMember(Name = "item")] 16 | public int Item { get; set; } 17 | 18 | [DataMember(Name = "name")] 19 | public string Name { get; set; } 20 | 21 | [DataMember(Name = "icon")] 22 | public string Icon { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterTalentGlyphs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterTalentGlyphs 11 | { 12 | [DataMember(Name = "major")] 13 | public IEnumerable Major { get; set; } 14 | 15 | [DataMember(Name = "minor")] 16 | public IEnumerable Minor { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterTalentInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterTalentInfo 11 | { 12 | [DataMember(Name = "tier")] 13 | public int Tier { get; set; } 14 | 15 | [DataMember(Name = "column")] 16 | public int Column { get; set; } 17 | 18 | [DataMember(Name = "spell")] 19 | public CharacterTalentSpell Spell { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterTalentSpec.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterTalentSpec 11 | { 12 | [DataMember(Name = "name")] 13 | public string Name { get; set; } 14 | 15 | [DataMember(Name = "role")] 16 | public string Role { get; set; } 17 | 18 | [DataMember(Name = "backgroundImage")] 19 | public string BackgroundImage { get; set; } 20 | 21 | [DataMember(Name = "icon")] 22 | public string Icon { get; set; } 23 | 24 | [DataMember(Name = "description")] 25 | public string Description { get; set; } 26 | 27 | [DataMember(Name = "order")] 28 | public int Order { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterTalentSpell.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterTalentSpell 11 | { 12 | [DataMember(Name = "id")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | 18 | [DataMember(Name = "icon")] 19 | public string Icon { get; set; } 20 | 21 | [DataMember(Name = "description")] 22 | public string Description { get; set; } 23 | 24 | [DataMember(Name = "range")] 25 | public string Range { get; set; } 26 | 27 | [DataMember(Name = "powerCost")] 28 | public string PowerCost { get; set; } 29 | 30 | [DataMember(Name = "castTime")] 31 | public string CastTime { get; set; } 32 | 33 | [DataMember(Name = "cooldown")] 34 | public string Colldown { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Explorers/Models/CharacterTitle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class CharacterTitle 11 | { 12 | [DataMember(Name="id")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Explorers/Models/Guild.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public enum UnitSide 11 | { 12 | ALLIANCE = 0, 13 | HORDE = 1 14 | } 15 | 16 | [DataContract] 17 | public class Guild 18 | { 19 | [DataMember(Name = "name")] 20 | public string Name { get; set; } 21 | 22 | [DataMember(Name = "realm")] 23 | public string Realm { get; set; } 24 | 25 | [DataMember(Name = "battlegroup")] 26 | public string Battlegroup { get; set; } 27 | 28 | [DataMember(Name = "side")] 29 | private int side { get; set; } 30 | 31 | [DataMember(Name = "level")] 32 | public int Level { get; set; } 33 | 34 | [DataMember(Name = "achievementPoints")] 35 | public int AchievementPoints { get; set; } 36 | 37 | [DataMember(Name = "lastModified")] 38 | public long LastModified { get; set; } 39 | 40 | [DataMember(Name = "emblem")] 41 | public GuildEmblem Emblem { get; set; } 42 | 43 | [DataMember(Name = "members")] 44 | public IEnumerable Members { get; set; } 45 | 46 | [DataMember(Name = "achievements")] 47 | public Achievements Achievements { get; set; } 48 | 49 | [DataMember(Name = "news")] 50 | public IEnumerable News { get; set; } 51 | 52 | public UnitSide Side { get { return (UnitSide)Enum.Parse(typeof(UnitSide), Enum.GetName(typeof(UnitSide), side)); } } 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Explorers/Models/GuildCharacter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class GuildCharacter 11 | { 12 | [DataMember(Name="lastModified")] 13 | public string LastModified { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | 18 | [DataMember(Name = "realm")] 19 | public string Realm { get; set; } 20 | 21 | [DataMember(Name = "guildRealm")] 22 | public string GuildRealm { get; set; } 23 | 24 | [DataMember(Name = "class")] 25 | private int @class { get; set; } 26 | 27 | [DataMember(Name = "race")] 28 | private int race { get; set; } 29 | 30 | [DataMember(Name = "gender")] 31 | private int gender { get; set; } 32 | 33 | [DataMember(Name = "level")] 34 | public int Level { get; set; } 35 | 36 | [DataMember(Name = "achievementPoints")] 37 | public int AchievementPoints { get; set; } 38 | 39 | [DataMember(Name = "thumbnail")] 40 | public string Thumbnail { get; set; } 41 | 42 | [DataMember(Name = "spec", IsRequired = false)] 43 | public GuildCharacterSpec Specialization { get; set; } 44 | 45 | public CharacterClass @Class { get { return (CharacterClass)Enum.Parse(typeof(CharacterClass), Enum.GetName(typeof(CharacterClass), @class).Replace(' ', '_')); } } 46 | public CharacterRace @Race { get { return (CharacterRace)Enum.Parse(typeof(CharacterRace), Enum.GetName(typeof(CharacterRace), race).Replace(' ', '_')); } } 47 | public CharacterGender Gender { get { return (CharacterGender)Enum.Parse(typeof(CharacterGender), Enum.GetName(typeof(CharacterGender), gender).Replace(' ', '_')); } } 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Explorers/Models/GuildCharacterSpec.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class GuildCharacterSpec 7 | { 8 | [DataMember(Name = "name")] 9 | public string Name { get; set; } 10 | 11 | [DataMember(Name = "role")] 12 | public string Role { get; set; } 13 | 14 | [DataMember(Name = "backgroundImage")] 15 | public string BackgroundImage { get; set; } 16 | 17 | [DataMember(Name = "icon")] 18 | public string Icon { get; set; } 19 | 20 | [DataMember(Name = "description")] 21 | public string Description { get; set; } 22 | 23 | [DataMember(Name = "order")] 24 | public int Order { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Explorers/Models/GuildEmblem.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class GuildEmblem 7 | { 8 | [DataMember(Name = "icon")] 9 | public int Icon { get; set; } 10 | 11 | [DataMember(Name = "iconColor")] 12 | public string IconColor { get; set; } 13 | 14 | [DataMember(Name = "border")] 15 | public int Border { get; set; } 16 | 17 | [DataMember(Name = "borderColor")] 18 | public string BorderColor { get; set; } 19 | 20 | [DataMember(Name = "backgroundColor")] 21 | public string BackgroundColor { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Explorers/Models/GuildMember.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class GuildMember 11 | { 12 | [DataMember(Name="character")] 13 | public GuildCharacter Character { get; set; } 14 | 15 | [DataMember(Name = "rank")] 16 | public int Rank { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Explorers/Models/GuildNews.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class GuildNews 8 | { 9 | [DataMember(Name = "type")] 10 | public string Type { get; set; } 11 | 12 | [DataMember(Name = "character")] 13 | public string Character { get; set; } 14 | 15 | [DataMember(Name = "timestamp")] 16 | public long Timestamp { get; set; } 17 | 18 | [DataMember(Name = "itemId")] 19 | public int ItemID { get; set; } 20 | 21 | [DataMember(Name = "achievement")] 22 | public AchievementInfo Achievement { get; set; } 23 | 24 | [DataMember(Name = "levelUp")] 25 | public int LevelUp { get; set; } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Explorers/Models/GuildPerkInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class GuildPerkInfo 11 | { 12 | [DataMember(Name="guildLevel")] 13 | public int GuildLevel { get; set; } 14 | 15 | [DataMember(Name = "spell")] 16 | public GuildPerkSpellInfo Spell { get; set; } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Explorers/Models/GuildPerkSpellInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class GuildPerkSpellInfo 11 | { 12 | [DataMember(Name="id")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | 18 | [DataMember(Name = "subtext")] 19 | public string Subtext { get; set; } 20 | 21 | [DataMember(Name = "icon")] 22 | public string Icon { get; set; } 23 | 24 | [DataMember(Name = "description")] 25 | public string Description { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Explorers/Models/GuildPerksData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class GuildPerksData 11 | { 12 | [DataMember(Name="perks")] 13 | public IEnumerable Perks { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/GuildRewardAchievementInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class GuildRewardAchievementInfo 11 | { 12 | [DataMember(Name = "id")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "title")] 16 | public string Title { get; set; } 17 | 18 | [DataMember(Name = "points")] 19 | public int Points { get; set; } 20 | 21 | [DataMember(Name = "description")] 22 | public string Description { get; set; } 23 | 24 | [DataMember(Name = "reward")] 25 | public string Reward { get; set; } 26 | 27 | [DataMember(Name = "rewardItem")] 28 | public GuildRewardItemInfo RewardItem { get; set; } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Explorers/Models/GuildRewardInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class GuildRewardInfo 11 | { 12 | [DataMember(Name = "minGuildLevel")] 13 | public int MinGuildLevel { get; set; } 14 | 15 | [DataMember(Name = "minGuildRepLevel")] 16 | public int MinGuildRepLevel { get; set; } 17 | 18 | [DataMember(Name = "races")] 19 | public IEnumerable Races { get; set; } 20 | 21 | [DataMember(Name = "achievement")] 22 | public GuildRewardAchievementInfo Achievement { get; set; } 23 | 24 | [DataMember(Name = "item")] 25 | public GuildRewardItemInfo Item { get; set; } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Explorers/Models/GuildRewardItemInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class GuildRewardItemInfo 11 | { 12 | 13 | [DataMember(Name="id")] 14 | public int Id { get; set; } 15 | 16 | [DataMember(Name="name")] 17 | public string Name { get; set; } 18 | 19 | [DataMember(Name="icon")] 20 | public string Icon { get; set; } 21 | 22 | [DataMember(Name="quality")] 23 | public int Quality { get; set; } 24 | 25 | [DataMember(Name="tooltipParams")] 26 | public ItemTooltipParameters TooltipParams { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Explorers/Models/GuildRewardsData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class GuildRewardsData 11 | { 12 | [DataMember(Name="rewards")] 13 | public IEnumerable Rewards { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/Item.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Item 11 | { 12 | [DataMember(Name = "id")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "description")] 16 | public string Description { get; set; } 17 | 18 | [DataMember(Name = "nameDescription")] 19 | public string NameDescription { get; set; } 20 | 21 | [DataMember(Name = "name")] 22 | public string Name { get; set; } 23 | 24 | [DataMember(Name = "stackable")] 25 | public int Stackable { get; set; } 26 | 27 | [DataMember(Name = "allowableClasses")] 28 | public IEnumerable AllowableClasses { get; set; } 29 | 30 | [DataMember(Name = "itemBind")] 31 | public int ItemBind { get; set; } 32 | 33 | [DataMember(Name = "bonusStats")] 34 | public IEnumerable BonusStats { get; set; } 35 | 36 | [DataMember(Name = "icon")] 37 | public string Icon { get; set; } 38 | 39 | [DataMember(Name = "itemSpells")] 40 | public IEnumerable ItemSpells { get; set; } 41 | 42 | [DataMember(Name = "buyPrice")] 43 | public int BuyPrice { get; set; } 44 | 45 | [DataMember(Name = "itemClass")] 46 | public int ItemClass { get; set; } 47 | 48 | [DataMember(Name = "itemSubClass")] 49 | public int ItemSubClass { get; set; } 50 | 51 | [DataMember(Name = "containerSlots")] 52 | public int ContainerSlots { get; set; } 53 | 54 | [DataMember(Name = "gemInfo")] 55 | public ItemGemInfo GemInfo { get; set; } 56 | 57 | [DataMember(Name = "weaponInfo")] 58 | public ItemWeaponInfo WeaponInfo { get; set; } 59 | 60 | [DataMember(Name = "inventoryType")] 61 | public int InventoryType { get; set; } 62 | 63 | [DataMember(Name = "equippable")] 64 | public bool Equippable { get; set; } 65 | 66 | [DataMember(Name = "itemLevel")] 67 | public int ItemLevel { get; set; } 68 | 69 | [DataMember(Name = "maxCount")] 70 | public int MaxCount { get; set; } 71 | 72 | [DataMember(Name = "maxDurability")] 73 | public int MaxDurability { get; set; } 74 | 75 | [DataMember(Name = "minFactionId")] 76 | public int MinFactionId { get; set; } 77 | 78 | [DataMember(Name = "minReputation")] 79 | public int MinReputation { get; set; } 80 | 81 | [DataMember(Name = "quality")] 82 | public int Quality { get; set; } 83 | 84 | [DataMember(Name = "sellPrice")] 85 | public int SellPrice { get; set; } 86 | 87 | [DataMember(Name = "requiredSkill")] 88 | public int RequiredSkill { get; set; } 89 | 90 | [DataMember(Name = "requiredLevel")] 91 | public int RequiredLevel { get; set; } 92 | 93 | [DataMember(Name = "requiredSkillRank")] 94 | public int RequiredSkillRank { get; set; } 95 | 96 | [DataMember(Name = "socketInfo")] 97 | public ItemSocketInfo SocketInfo { get; set; } 98 | 99 | [DataMember(Name = "itemSource")] 100 | public ItemSourceInfo ItemSource { get; set; } 101 | 102 | [DataMember(Name = "baseArmor")] 103 | public int BaseArmor { get; set; } 104 | 105 | [DataMember(Name = "hasSockets")] 106 | public bool HasSockets { get; set; } 107 | 108 | [DataMember(Name = "isAuctionable")] 109 | public bool IsAuctionable { get; set; } 110 | 111 | [DataMember(Name = "upgradable")] 112 | public bool Upgradable { get; set; } 113 | 114 | [DataMember(Name = "disenchantingSkillRank")] 115 | public int DisenchantingSkillRank { get; set; } 116 | 117 | [DataMember(Name = "displayInfoId")] 118 | public int DisplayInfoId { get; set; } 119 | 120 | [DataMember(Name = "heroicTooltip")] 121 | public bool HeroicTooltip { get; set; } 122 | 123 | [DataMember(Name = "nameDescriptionColor")] 124 | public string NameDescriptionColor { get; set; } 125 | 126 | public override string ToString() 127 | { 128 | return string.Format("{0}", Name); 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /Explorers/Models/ItemBonusStat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ItemBonusStat 11 | { 12 | [DataMember(Name = "stat")] 13 | public int Stat { get; set; } 14 | 15 | [DataMember(Name = "amount")] 16 | public int Amount { get; set; } 17 | 18 | [DataMember(Name = "reforged")] 19 | public bool Reforged { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Explorers/Models/ItemClassData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class ItemClassData 8 | { 9 | [DataMember(Name = "classes")] 10 | public IEnumerable Classes { get; set; } 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Explorers/Models/ItemClassInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class ItemClassInfo 7 | { 8 | [DataMember(Name = "class")] 9 | public int Class { get; set; } 10 | 11 | [DataMember(Name = "name")] 12 | public string Name { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Explorers/Models/ItemGemBonusInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class ItemGemBonusInfo 7 | { 8 | [DataMember(Name = "name")] 9 | public string Name { get; set; } 10 | 11 | [DataMember(Name = "srcItemId")] 12 | public int SourceItemId { get; set; } 13 | 14 | [DataMember(Name = "requiredSkillId")] 15 | public int RequiredSkillId { get; set; } 16 | 17 | [DataMember(Name = "requiredSkillRank")] 18 | public int RequiredSkillRank { get; set; } 19 | 20 | [DataMember(Name = "minLevel")] 21 | public int MinLevel { get; set; } 22 | 23 | [DataMember(Name = "itemLevel")] 24 | public int ItemLevel { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Explorers/Models/ItemGemInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class ItemGemInfo 7 | { 8 | [DataMember(Name = "bonus")] 9 | public ItemGemBonusInfo Bonus { get; set; } 10 | 11 | [DataMember(Name = "type")] 12 | public ItemGemType Type { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Explorers/Models/ItemGemType.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models 4 | { 5 | [DataContract] 6 | public class ItemGemType 7 | { 8 | [DataMember(Name = "type")] 9 | public string Color { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Explorers/Models/ItemSocket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ItemSocket 11 | { 12 | [DataMember(Name = "type")] 13 | public string Type { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/ItemSocketInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ItemSocketInfo 11 | { 12 | [DataMember(Name="sockets")] 13 | public IEnumerable Sockets { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/ItemSourceInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ItemSourceInfo 11 | { 12 | [DataMember(Name = "sourceId")] 13 | public int SourceId { get; set; } 14 | 15 | [DataMember(Name = "sourceType")] 16 | public string SourceType { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Explorers/Models/ItemSpell.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ItemSpell 11 | { 12 | [DataMember(Name = "id")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | 18 | [DataMember(Name = "icon")] 19 | public string Icon { get; set; } 20 | 21 | [DataMember(Name = "description")] 22 | public string Description { get; set; } 23 | 24 | [DataMember(Name = "range")] 25 | public string Range { get; set; } 26 | 27 | [DataMember(Name = "powerCost")] 28 | public string PowerCost { get; set; } 29 | 30 | [DataMember(Name = "castTime")] 31 | public string CastTime { get; set; } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Explorers/Models/ItemSpellInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ItemSpellInfo 11 | { 12 | [DataMember(Name="spellId")] 13 | public int SpellId { get; set; } 14 | 15 | [DataMember(Name="nCharges")] 16 | public int NCharges { get; set; } 17 | 18 | [DataMember(Name="consumable")] 19 | public bool Consumable { get; set; } 20 | 21 | [DataMember(Name = "categoryId")] 22 | public int CategoryId { get; set; } 23 | 24 | [DataMember(Name = "spell")] 25 | public ItemSpell Spell { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Explorers/Models/ItemStat.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models { 4 | [DataContract] 5 | public class ItemStat { 6 | [DataMember(Name = "stat")] 7 | public int Stat { get; set; } 8 | 9 | [DataMember(Name = "amount")] 10 | public int Amount { get; set; } 11 | 12 | [DataMember(Name = "reforgedAmount")] 13 | public int ReforgedAmount { get; set; } 14 | 15 | [DataMember(Name = "reforged")] 16 | public bool Reforged { get; set; } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Explorers/Models/ItemTooltipParameters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ItemTooltipParameters 11 | { 12 | [DataMember(Name="gem0")] 13 | public int Gem0 { get; set; } 14 | 15 | [DataMember(Name = "gem1")] 16 | public int Gem1 { get; set; } 17 | 18 | [DataMember(Name = "gem2")] 19 | public int Gem2 { get; set; } 20 | 21 | [DataMember(Name = "enchant")] 22 | public int Enchant { get; set; } 23 | 24 | [DataMember(Name = "reforge")] 25 | public int Reforge { get; set; } 26 | 27 | [DataMember(Name = "set")] 28 | public IEnumerable @Set { get; set; } 29 | 30 | [DataMember(Name = "seed")] 31 | public long Seed { get; set; } 32 | 33 | [DataMember(Name = "extraSocket")] 34 | public bool ExtraSocket { get; set; } 35 | 36 | [DataMember(Name = "suffix")] 37 | public int Suffix { get; set; } 38 | 39 | [DataMember(Name = "upgrade")] 40 | public ItemUpgrade ItemUpgrade { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Explorers/Models/ItemUpgrade.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace WowDotNetAPI.Models { 4 | [DataContract] 5 | public class ItemUpgrade { 6 | [DataMember(Name = "current")] 7 | public int Current { get; set; } 8 | 9 | [DataMember(Name = "total")] 10 | public int Total { get; set; } 11 | 12 | [DataMember(Name = "itemLevelIncrement")] 13 | public int ItemLevelIncrement { get; set; } 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Explorers/Models/ItemWeaponDamage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ItemWeaponDamage 11 | { 12 | [DataMember(Name="min")] 13 | public int MinDamage { get; set; } 14 | 15 | [DataMember(Name = "max")] 16 | public int MaxDamage { get; set; } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Explorers/Models/ItemWeaponInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class ItemWeaponInfo 11 | { 12 | [DataMember(Name = "damage")] 13 | public ItemWeaponDamage Damage { get; set; } 14 | 15 | [DataMember(Name="weaponSpeed")] 16 | public double WeaponSpeed { get; set; } 17 | 18 | [DataMember(Name = "dps")] 19 | public double Dps { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Explorers/Models/Leaderboard.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public enum Bracket 8 | { 9 | _2v2, 10 | _3v3, 11 | _5v5, 12 | rbg 13 | } 14 | 15 | [DataContract] 16 | public class Leaderboard 17 | { 18 | [DataMember(Name = "rows")] 19 | public IEnumerable PvpStats { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Explorers/Models/Mount.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Mount 11 | { 12 | [DataMember(Name = "name")] 13 | public string Name { get; set; } 14 | 15 | [DataMember(Name = "spellId")] 16 | public int SpellId { get; set; } 17 | 18 | [DataMember(Name = "creatureId")] 19 | public int CreatureId { get; set; } 20 | 21 | [DataMember(Name = "itemId")] 22 | public int ItemId { get; set; } 23 | 24 | [DataMember(Name = "qualityId")] 25 | public int QualityId { get; set; } 26 | 27 | [DataMember(Name = "icon")] 28 | public string Icon { get; set; } 29 | 30 | [DataMember(Name = "isGround")] 31 | public bool IsGround { get; set; } 32 | 33 | [DataMember(Name = "isFlying")] 34 | public bool IsFlying { get; set; } 35 | 36 | [DataMember(Name = "isAquatic")] 37 | public bool IsAquatic { get; set; } 38 | 39 | [DataMember(Name = "isJumping")] 40 | public bool IsJumping { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Explorers/Models/Mounts.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Mounts 11 | { 12 | [DataMember(Name = "mounts")] 13 | public IEnumerable MountList { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/Pet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Pet 11 | { 12 | [DataMember(Name = "battlePetId")] 13 | public int BattlePetId { get; set; } 14 | 15 | [DataMember(Name = "canBattle")] 16 | public bool CanBattle { get; set; } 17 | 18 | [DataMember(Name = "creatureId")] 19 | public long CreatureId { get; set; } 20 | 21 | [DataMember(Name = "creatureName")] 22 | public string CreatureName { get; set; } 23 | 24 | [DataMember(Name = "icon")] 25 | public string Icon { get; set; } 26 | 27 | [DataMember(Name = "isFavorite")] 28 | public bool IsFavorite { get; set; } 29 | 30 | [DataMember(Name="name")] 31 | public string Name { get; set; } 32 | 33 | [DataMember(Name = "qualityId")] 34 | public int QualityId { get; set; } 35 | 36 | [DataMember(Name = "spellId")] 37 | public long SpellId { get; set; } 38 | 39 | [DataMember(Name = "stats")] 40 | public PetStats Stats { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Explorers/Models/PetAbility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class PetAbility 11 | { 12 | [DataMember(Name = "slot")] 13 | public int Slot { get; set; } 14 | 15 | [DataMember(Name = "order")] 16 | public int Order { get; set; } 17 | 18 | [DataMember(Name = "requiredLevel")] 19 | public int RequiredLevel { get; set; } 20 | 21 | [DataMember(Name = "id")] 22 | public int AbilityId { get; set; } 23 | 24 | [DataMember(Name = "name")] 25 | public string Name { get; set; } 26 | 27 | [DataMember(Name = "icon")] 28 | public string Icon { get; set; } 29 | 30 | [DataMember(Name = "cooldown")] 31 | public int Cooldown { get; set; } 32 | 33 | [DataMember(Name = "rounds")] 34 | public int Rounds { get; set; } 35 | 36 | [DataMember(Name = "petTypeId")] 37 | public int PetTypeId { get; set; } 38 | 39 | [DataMember(Name = "isPassive")] 40 | public bool IsPassive { get; set; } 41 | 42 | [DataMember(Name = "hideHints")] 43 | public bool HideHints { get; set; } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Explorers/Models/PetAbilityDetails.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class PetAbilityDetails 11 | { 12 | [DataMember(Name = "id")] 13 | public int AbilityId { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | 18 | [DataMember(Name = "icon")] 19 | public string Icon { get; set; } 20 | 21 | [DataMember(Name = "cooldown")] 22 | public int Cooldown { get; set; } 23 | 24 | [DataMember(Name = "rounds")] 25 | public int Rounds { get; set; } 26 | 27 | [DataMember(Name = "petTypeId")] 28 | public int PetTypeId { get; set; } 29 | 30 | [DataMember(Name = "isPassive")] 31 | public bool IsPassive { get; set; } 32 | 33 | [DataMember(Name = "hideHints")] 34 | public bool HideHints { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Explorers/Models/PetList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class PetList 11 | { 12 | [DataMember(Name = "pets")] 13 | public IEnumerable Pets { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/PetSpecies.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class PetSpecies 11 | { 12 | [DataMember(Name = "speciesId")] 13 | public int SpeciesId { get; set; } 14 | 15 | [DataMember(Name = "petTypeId")] 16 | public int PetTypeId { get; set; } 17 | 18 | [DataMember(Name = "creatureId")] 19 | public int CreatureId { get; set; } 20 | 21 | [DataMember(Name = "name")] 22 | public string Name { get; set; } 23 | 24 | [DataMember(Name = "canBattle")] 25 | public bool CanBattle { get; set; } 26 | 27 | [DataMember(Name = "icon")] 28 | public string Icon { get; set; } 29 | 30 | [DataMember(Name = "description")] 31 | public string Description { get; set; } 32 | 33 | [DataMember(Name = "source")] 34 | public string Source { get; set; } 35 | 36 | [DataMember(Name = "abilities")] 37 | public IEnumerable Abilities { get; set; } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Explorers/Models/PetStats.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class PetStats 11 | { 12 | [DataMember(Name = "breedId")] 13 | public int BreedId { get; set; } 14 | 15 | [DataMember(Name = "health")] 16 | public int Health { get; set; } 17 | 18 | [DataMember(Name = "level")] 19 | public int Level { get; set; } 20 | 21 | [DataMember(Name = "petQualityId")] 22 | public int QualityId { get; set; } 23 | 24 | [DataMember(Name = "power")] 25 | public int Power { get; set; } 26 | 27 | [DataMember(Name = "speciesId")] 28 | public int SpeciesId { get; set; } 29 | 30 | [DataMember(Name = "speed")] 31 | public int Speed { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Explorers/Models/PetType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class PetType 11 | { 12 | [DataMember(Name = "id")] 13 | public int PetTypeId { get; set; } 14 | 15 | [DataMember(Name = "key")] 16 | public string Key { get; set; } 17 | 18 | [DataMember(Name = "name")] 19 | public string Name { get; set; } 20 | 21 | [DataMember(Name = "typeAbilityId")] 22 | public int TypeAbilityId { get; set; } 23 | 24 | [DataMember(Name = "strongAgainstId")] 25 | public int StrongAgainstId { get; set; } 26 | 27 | [DataMember(Name = "weakAgainstId")] 28 | public int WeakAgainstId { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Explorers/Models/PetTypeData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class PetTypeData 11 | { 12 | [DataMember(Name = "petTypes")] 13 | public IEnumerable PetTypes { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/Progression.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Progression 11 | { 12 | [DataMember(Name="raids")] 13 | public IEnumerable Raids { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/PvpStats.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace WowDotNetAPI.Models 5 | { 6 | [DataContract] 7 | public class PvpStats 8 | { 9 | [DataMember(Name = "ranking")] 10 | public int Ranking { get; set; } 11 | 12 | [DataMember(Name = "rating")] 13 | public int Rating { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | 18 | [DataMember(Name = "realmId")] 19 | public int RealmId { get; set; } 20 | 21 | [DataMember(Name = "realmName")] 22 | public string RealmName { get; set; } 23 | 24 | [DataMember(Name = "realmSlug")] 25 | public string RealmSlug { get; set; } 26 | 27 | [DataMember(Name = "raceId")] 28 | private int raceId { get; set; } 29 | 30 | [DataMember(Name = "classId")] 31 | private int classId { get; set; } 32 | 33 | [DataMember(Name = "specId")] 34 | private int specId { get; set; } 35 | 36 | [DataMember(Name = "factionId")] 37 | public int FactionId { get; set; } 38 | 39 | [DataMember(Name = "genderId")] 40 | private int genderId { get; set; } 41 | 42 | [DataMember(Name = "seasonWins")] 43 | public int SeasonWins { get; set; } 44 | 45 | [DataMember(Name = "seasonLosses")] 46 | public int SeasonLosses { get; set; } 47 | 48 | [DataMember(Name = "weeklyWins")] 49 | public int WeeklyWins { get; set; } 50 | 51 | [DataMember(Name = "weeklyLosses")] 52 | public int WeeklyLosses { get; set; } 53 | 54 | public CharacterClass Class { get { return (CharacterClass)Enum.Parse(typeof(CharacterClass), Enum.GetName(typeof(CharacterClass), classId).Replace(' ', '_')); } } 55 | public CharacterRace Race { get { return (CharacterRace)Enum.Parse(typeof(CharacterRace), Enum.GetName(typeof(CharacterRace), raceId).Replace(' ', '_')); } } 56 | public CharacterGender Gender { get { return (CharacterGender)Enum.Parse(typeof(CharacterGender), Enum.GetName(typeof(CharacterGender), genderId).Replace(' ', '_')); } } 57 | public CharacterSpec Spec { get { return (CharacterSpec)Enum.Parse(typeof(CharacterSpec), Enum.GetName(typeof(CharacterSpec), specId).Replace(' ', '_')); } } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Explorers/Models/Quest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Quest 11 | { 12 | [DataMember(Name = "id")] 13 | public int QuestId { get; set; } 14 | 15 | [DataMember(Name = "title")] 16 | public string Title { get; set; } 17 | 18 | [DataMember(Name = "reqLevel")] 19 | public int RequiredLevel { get; set; } 20 | 21 | [DataMember(Name = "suggestedPartyMembers")] 22 | public int SuggestedPartyMembers { get; set; } 23 | 24 | [DataMember(Name = "category")] 25 | public string Category { get; set; } 26 | 27 | [DataMember(Name = "level")] 28 | public int Level { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Explorers/Models/Raid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Raid 11 | { 12 | [DataMember(Name="name")] 13 | public string Name { get; set; } 14 | 15 | [DataMember(Name = "lfr")] 16 | public int LFR { get; set; } 17 | 18 | [DataMember(Name = "normal")] 19 | public int Normal { get; set; } 20 | 21 | [DataMember(Name = "heroic")] 22 | public int Heroic { get; set; } 23 | 24 | [DataMember(Name = "mythic")] 25 | public int Mythic { get; set; } 26 | 27 | [DataMember(Name = "id")] 28 | public int Id { get; set; } 29 | 30 | [DataMember(Name = "bosses")] 31 | public IEnumerable Bosses { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Explorers/Models/RaidBoss.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class RaidBoss 11 | { 12 | [DataMember(Name="name")] 13 | public string Name { get; set; } 14 | 15 | [DataMember(Name = "lfrKills")] 16 | public int LfrKills { get; set; } 17 | 18 | [DataMember(Name = "lfrTimestamp")] 19 | public ulong LfrTimestamp { get; set; } 20 | 21 | [DataMember(Name = "normalKills")] 22 | public int NormalKills { get; set; } 23 | 24 | [DataMember(Name = "normalTimestamp")] 25 | public ulong NormalTimestamp { get; set; } 26 | 27 | [DataMember(Name = "heroicKills")] 28 | public int HeroicKills { get; set; } 29 | 30 | [DataMember(Name = "heroicTimestamp")] 31 | public ulong HeroicTimestamp { get; set; } 32 | 33 | [DataMember(Name = "mythicKills")] 34 | public int MythicKills { get; set; } 35 | 36 | [DataMember(Name = "mythicTimestamp")] 37 | public ulong MythicrTimestamp { get; set; } 38 | 39 | [DataMember(Name = "id")] 40 | public int Id { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Explorers/Models/Realm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Text; 4 | using System.Runtime.Serialization; 5 | 6 | namespace WowDotNetAPI.Models 7 | { 8 | [DataContract] 9 | public enum RealmType 10 | { 11 | [EnumMember(Value = "pve")] 12 | PVE, 13 | [EnumMember(Value = "pvp")] 14 | PVP, 15 | [EnumMember(Value = "rp")] 16 | RP, 17 | [EnumMember(Value = "rppvp")] 18 | RPPVP 19 | } 20 | 21 | //TODO: sort out issue with enum member n/a . It seems there's an issue with the forward slash and how we serialize and the try to parse it 22 | //[DataContract] 23 | //public enum RealmPopulation 24 | //{ 25 | // [EnumMember(Value = "low")] 26 | // LOW, 27 | // [EnumMember(Value = "medium")] 28 | // MEDIUM, 29 | // [EnumMember(Value = "high")] 30 | // HIGH, 31 | // [EnumMember(Value = "n/a")] 32 | // NA 33 | //} 34 | 35 | [DataContract] 36 | public class Realm 37 | { 38 | [DataMember(Name = "type")] 39 | private string type { get; set; } 40 | 41 | [DataMember(Name = "queue")] 42 | public bool Queue { get; set; } 43 | 44 | [DataMember(Name = "status")] 45 | public bool Status { get; set; } 46 | 47 | [DataMember(Name = "population")] 48 | public string population { get; set; } 49 | 50 | [DataMember(Name = "name")] 51 | public string Name { get; set; } 52 | 53 | [DataMember(Name = "slug")] 54 | public string Slug { get; set; } 55 | 56 | [DataMember(Name = "battlegroup")] 57 | public string Battlegroup { get; set; } 58 | 59 | [DataMember(Name = "locale")] 60 | public string Locale { get; set; } 61 | 62 | public RealmType Type { get { return (RealmType)Enum.Parse(typeof(RealmType), type, true); } } 63 | 64 | //See enum TODO comments 65 | //public RealmPopulation Population { get { return (RealmPopulation)Enum.Parse(typeof(RealmPopulation), population, true); } } 66 | 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Explorers/Models/RealmsData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Runtime.Serialization; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class RealmsData 11 | { 12 | [DataMember(Name = "realms")] 13 | public IEnumerable Realms { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Explorers/Models/Recipe.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Recipe 11 | { 12 | [DataMember(Name = "id")] 13 | public int RecipeId { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | 18 | [DataMember(Name = "profession")] 19 | public string Profession { get; set; } 20 | 21 | [DataMember(Name = "icon")] 22 | public string Icon { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Explorers/Models/Spell.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | 7 | namespace WowDotNetAPI.Models 8 | { 9 | [DataContract] 10 | public class Spell 11 | { 12 | [DataMember(Name = "id")] 13 | public int SpellId { get; set; } 14 | 15 | [DataMember(Name = "name")] 16 | public string Name { get; set; } 17 | 18 | [DataMember(Name = "icon")] 19 | public string Icon { get; set; } 20 | 21 | [DataMember(Name = "description")] 22 | public string Description { get; set; } 23 | 24 | [DataMember(Name = "range")] 25 | public string Range { get; set; } 26 | 27 | [DataMember(Name = "powerCost")] 28 | public string PowerCost { get; set; } 29 | 30 | [DataMember(Name = "castTime")] 31 | public string CastTime { get; set; } 32 | 33 | [DataMember(Name = "cooldown")] 34 | public string Cooldown { get; set; } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Explorers/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RealmAPI")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("RealmAPI")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a75dc4da-0d3f-4655-af42-bce03f233a4c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Explorers/Utilities/CharacterUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace WowDotNetAPI.Utilities 7 | { 8 | public static class CharacterUtility 9 | { 10 | public static string buildOptionalQuery(CharacterOptions characterOptions) 11 | { 12 | string query = "&fields="; 13 | List tmp = new List(); 14 | 15 | if ((characterOptions & CharacterOptions.GetGuild) == CharacterOptions.GetGuild) 16 | tmp.Add("guild"); 17 | 18 | if ((characterOptions & CharacterOptions.GetStats) == CharacterOptions.GetStats) 19 | tmp.Add("stats"); 20 | 21 | if ((characterOptions & CharacterOptions.GetTalents) == CharacterOptions.GetTalents) 22 | tmp.Add("talents"); 23 | 24 | if ((characterOptions & CharacterOptions.GetItems) == CharacterOptions.GetItems) 25 | tmp.Add("items"); 26 | 27 | if ((characterOptions & CharacterOptions.GetReputation) == CharacterOptions.GetReputation) 28 | tmp.Add("reputation"); 29 | 30 | if ((characterOptions & CharacterOptions.GetTitles) == CharacterOptions.GetTitles) 31 | tmp.Add("titles"); 32 | 33 | if ((characterOptions & CharacterOptions.GetProfessions) == CharacterOptions.GetProfessions) 34 | tmp.Add("professions"); 35 | 36 | if ((characterOptions & CharacterOptions.GetAppearance) == CharacterOptions.GetAppearance) 37 | tmp.Add("appearance"); 38 | 39 | if ((characterOptions & CharacterOptions.GetPetSlots) == CharacterOptions.GetPetSlots) 40 | tmp.Add("petSlots"); 41 | 42 | if ((characterOptions & CharacterOptions.GetMounts) == CharacterOptions.GetMounts) 43 | tmp.Add("mounts"); 44 | 45 | if ((characterOptions & CharacterOptions.GetPets) == CharacterOptions.GetPets) 46 | tmp.Add("pets"); 47 | 48 | if ((characterOptions & CharacterOptions.GetAchievements) == CharacterOptions.GetAchievements) 49 | tmp.Add("achievements"); 50 | 51 | if ((characterOptions & CharacterOptions.GetProgression) == CharacterOptions.GetProgression) 52 | tmp.Add("progression"); 53 | 54 | if ((characterOptions & CharacterOptions.GetFeed) == CharacterOptions.GetFeed) 55 | tmp.Add("feed"); 56 | 57 | if ((characterOptions & CharacterOptions.GetPvP) == CharacterOptions.GetPvP) 58 | tmp.Add("pvp"); 59 | 60 | if ((characterOptions & CharacterOptions.GetQuests) == CharacterOptions.GetQuests) 61 | tmp.Add("quests"); 62 | 63 | if ((characterOptions & CharacterOptions.GetHunterPets) == CharacterOptions.GetHunterPets) 64 | tmp.Add("hunterPets"); 65 | 66 | //petSlots 67 | //Pets 68 | 69 | if (tmp.Count == 0) return string.Empty; 70 | 71 | query += string.Join(",", tmp.ToArray()); 72 | 73 | return query; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Explorers/Utilities/GuildUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace WowDotNetAPI.Utilities 7 | { 8 | public static class GuildUtility 9 | { 10 | public static string buildOptionalQuery(GuildOptions realmOptions) 11 | { 12 | string query = "&fields="; 13 | List tmp = new List(); 14 | 15 | if ((realmOptions & GuildOptions.GetMembers) == GuildOptions.GetMembers) 16 | tmp.Add("members"); 17 | 18 | if ((realmOptions & GuildOptions.GetAchievements) == GuildOptions.GetAchievements) 19 | tmp.Add("achievements"); 20 | 21 | if ((realmOptions & GuildOptions.GetNews) == GuildOptions.GetNews) 22 | tmp.Add("news"); 23 | 24 | if (tmp.Count == 0) return string.Empty; 25 | 26 | query += string.Join(",", tmp.ToArray()); 27 | 28 | return query; 29 | } 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Explorers/Utilities/JsonUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Net; 6 | using System.IO; 7 | using System.Runtime.Serialization.Json; 8 | using System.Security.Cryptography; 9 | 10 | namespace WowDotNetAPI.Utilities 11 | { 12 | public static class JsonUtility 13 | { 14 | public static string GetJSON(string url) 15 | { 16 | HttpWebRequest req = WebRequest.Create(url) as HttpWebRequest; 17 | return GetJSON(req); 18 | } 19 | 20 | public static string GetJSON(HttpWebRequest req) 21 | { 22 | try 23 | { 24 | HttpWebResponse res = req.GetResponse() as HttpWebResponse; 25 | 26 | StreamReader streamReader = new StreamReader(res.GetResponseStream(), Encoding.UTF8); 27 | return streamReader.ReadToEnd(); 28 | } 29 | catch (Exception e) 30 | { 31 | throw e; 32 | } 33 | } 34 | 35 | //JSON serialization - http://www.joe-stevens.com/2009/12/29/json-serialization-using-the-datacontractjsonserializer-and-c/ 36 | public static T FromJSON(string url) where T : class 37 | { 38 | HttpWebRequest req = WebRequest.Create(url) as HttpWebRequest; 39 | return FromJSON(req); 40 | } 41 | 42 | public static T FromJSON(HttpWebRequest req) where T : class 43 | { 44 | using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(GetJSON(req)))) 45 | { 46 | DataContractJsonSerializer DataContractJsonSerializer = new DataContractJsonSerializer(typeof(T)); 47 | return DataContractJsonSerializer.ReadObject(stream) as T; 48 | } 49 | } 50 | 51 | public static T FromJSON(string url, string publicAuthKey, string privateAuthKey) where T : class 52 | { 53 | HttpWebRequest req = WebRequest.Create(url) as HttpWebRequest; 54 | DateTime date = DateTime.Now.ToUniversalTime(); 55 | req.Date = date; 56 | 57 | string stringToSign = 58 | req.Method + "\n" 59 | + date.ToString("r") + "\n" 60 | + req.RequestUri.AbsolutePath + "\n"; 61 | 62 | byte[] buffer = Encoding.UTF8.GetBytes(stringToSign); 63 | 64 | HMACSHA1 hmac = new HMACSHA1(Encoding.UTF8.GetBytes(privateAuthKey)); 65 | 66 | string signature = Convert.ToBase64String(hmac.ComputeHash(buffer)); 67 | 68 | req.Headers[HttpRequestHeader.Authorization] 69 | = "BNET " + publicAuthKey + ":" + signature; 70 | 71 | return FromJSON(req); 72 | } 73 | 74 | public static string ToJSON(T obj) where T : class 75 | { 76 | using (MemoryStream stream = new MemoryStream()) 77 | { 78 | DataContractJsonSerializer DataContractJsonSerializer = new DataContractJsonSerializer(typeof(T)); 79 | 80 | DataContractJsonSerializer.WriteObject(stream, obj); 81 | return Encoding.UTF8.GetString(stream.ToArray()); 82 | } 83 | } 84 | 85 | public static T FromJSONStream(StreamReader sr) where T : class 86 | { 87 | using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(sr.ReadToEnd()))) 88 | { 89 | DataContractJsonSerializer DataContractJsonSerializer = new DataContractJsonSerializer(typeof(T)); 90 | return DataContractJsonSerializer.ReadObject(stream) as T; 91 | } 92 | } 93 | 94 | public static T FromJSONString(string str) where T : class 95 | { 96 | using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(str))) 97 | { 98 | DataContractJsonSerializer DataContractJsonSerializer = new DataContractJsonSerializer(typeof(T)); 99 | return DataContractJsonSerializer.ReadObject(stream) as T; 100 | } 101 | } 102 | 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /Explorers/lib/4.0/WowDotNetAPI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/briandek/WowDotNetAPI/e27220ea9a14a53b098c1e15521ad7fd0a9c718f/Explorers/lib/4.0/WowDotNetAPI.dll -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | WowDotNetAPI 2 | ========= 3 | WowDotNetAPI is a C# .Net library for the World of Warcraft Community Platform API 4 | 5 | THE LIBRARY IS STILL EVOLVING WITH THE PLATFORM API CHANGES. USE AT OWN RISK - AND JUMP IN, HACK AWAY AND HELP OUT :] 6 | 7 | As of 8/24 you'll need a Mashery API key to use this api library/wrapper. For more info please see 8 | [https://dev.battle.net/docs/read/community_apis/migration](https://dev.battle.net/docs/read/community_apis/migration) 9 | 10 | You can now obtain the WowDotNetAPI dll through nuget. More information at [http://nuget.org/List/Packages/WowDotNetAPI](http://nuget.org/List/Packages/WowDotNetAPI) 11 | 12 | Todo: Build Character Audit model and use JavascriptSerializer 13 | 14 | Sample: 15 | ========= 16 | using System; 17 | using System.Collections.Generic; 18 | using System.Linq; 19 | using System.Text; 20 | using System.Threading.Tasks; 21 | using WowDotNetAPI; 22 | using WowDotNetAPI.Models; 23 | 24 | namespace TestConsoleApplication 25 | { 26 | class Program 27 | { 28 | static void Main(string[] args) 29 | { 30 | WowExplorer explorer = new WowExplorer(Region.US, Locale.en_US, "YOUR-MASHERY-API-KEY-GOES-HERE"); 31 | 32 | Guild immortalityGuild = explorer.GetGuild("skullcrusher", "immortality", GuildOptions.GetEverything); 33 | 34 | Console.WriteLine("\n\nGUILD EXPLORER SAMPLE\n"); 35 | 36 | Console.WriteLine("{0} is a guild of level {1} and has {2} members.", 37 | immortalityGuild.Name, 38 | immortalityGuild.Level, 39 | immortalityGuild.Members.Count()); 40 | 41 | //Print out first top 20 ranked members of Immortality 42 | foreach (GuildMember member in immortalityGuild.Members.OrderBy(m => m.Rank).Take(20)) 43 | { 44 | Console.WriteLine(member.Character.Name + " has rank " + member.Rank); 45 | } 46 | 47 | Console.WriteLine("\n\nCHARACTER EXPLORER SAMPLE\n"); 48 | Character briandekCharacter = 49 | explorer.GetCharacter("skullcrusher", "briandek", CharacterOptions.GetStats | CharacterOptions.GetAchievements); 50 | 51 | Console.WriteLine("{0} is a retired warrior of level {1} who has {2} achievement points having completed {3} achievements", 52 | briandekCharacter.Name, 53 | briandekCharacter.Level, 54 | briandekCharacter.AchievementPoints, 55 | briandekCharacter.Achievements.AchievementsCompleted.Count()); 56 | 57 | foreach (KeyValuePair stat in briandekCharacter.Stats) 58 | { 59 | Console.WriteLine(stat.Key + " : " + stat.Value); 60 | } 61 | 62 | //Get one realm 63 | IEnumerable usRealms = explorer.GetRealms(); 64 | Realm skullcrusher = usRealms.First(r => r.Name == "Skullcrusher"); 65 | 66 | //Get all pvp realms only 67 | IEnumerable pvpRealmsOnly = usRealms.Where(r => r.Type == RealmType.PVP); 68 | Console.WriteLine("\n\nREALMS EXPLORER SAMPLE\n"); 69 | foreach (var realm in pvpRealmsOnly) 70 | { 71 | Console.WriteLine("{0} has {1} population", realm.Name, realm.population); 72 | } 73 | 74 | Console.WriteLine("\n\nGUILD PERKS\n"); 75 | 76 | IEnumerable perks = explorer.GetGuildPerks(); 77 | foreach (var perk in perks) 78 | { 79 | Console.WriteLine("{0} perk at guild level {1}", perk.Spell.Name, perk.GuildLevel); 80 | } 81 | 82 | Console.WriteLine("\n\nGUILD REWARDS\n"); 83 | 84 | IEnumerable rewards = explorer.GetGuildRewards(); 85 | foreach (var reward in rewards) 86 | { 87 | Console.WriteLine("{0} reward at min guild level {1}", reward.Item.Name, reward.MinGuildLevel); 88 | } 89 | 90 | Console.WriteLine("\n\nCHARACTER RACES\n"); 91 | 92 | IEnumerable races = explorer.GetCharacterRaces(); 93 | foreach (var race in races.OrderBy(r => r.Id)) 94 | { 95 | Console.WriteLine("{0} race with numeric value {1}", race.Name, race.Id); 96 | } 97 | 98 | Console.WriteLine("\n\nCHARACTER CLASSES\n"); 99 | 100 | IEnumerable classes = explorer.GetCharacterClasses(); 101 | foreach (var @class in classes.OrderBy(c => c.Id)) 102 | { 103 | Console.WriteLine("{0} class with numeric value {1}", @class.Name, @class.Id); 104 | } 105 | 106 | } 107 | } 108 | } 109 | 110 | 111 | 112 | 113 | 114 | Contributing 115 | ============ 116 | 117 | Please feel free to jump in and contribute to the project. 118 | Just fork the project, commit your changes (preferably to a new branch), and then send me a pull request via GitHub. 119 | Please add tests for your feature or fix. 120 | 121 | 122 | 123 | License 124 | ======= 125 | 126 | WowDotNetAPI is released under the MIT license. 127 | 128 | Copyright (c) 2011 Briam Ramos 129 | 130 | Permission is hereby granted, free of charge, to any person 131 | obtaining a copy of this software and associated documentation 132 | files (the "Software"), to deal in the Software without 133 | restriction, including without limitation the rights to use, 134 | copy, modify, merge, publish, distribute, sublicense, and/or sell 135 | copies of the Software, and to permit persons to whom the 136 | Software is furnished to do so, subject to the following 137 | conditions: 138 | 139 | The above copyright notice and this permission notice shall be 140 | included in all copies or substantial portions of the Software. 141 | 142 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 143 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 144 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 145 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 146 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 147 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 148 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 149 | OTHER DEALINGS IN THE SOFTWARE. 150 | -------------------------------------------------------------------------------- /WowDotNetAPI.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Explorers", "Explorers\Explorers.csproj", "{2A828141-9EF2-4A8A-8944-B2F2D1775CC9}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Explorers.Test", "Explorers.Test\Explorers.Test.csproj", "{F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}" 7 | EndProject 8 | Global 9 | GlobalSection(TestCaseManagementSettings) = postSolution 10 | CategoryFile = WowDotNetAPI.vsmdi 11 | EndGlobalSection 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Any CPU = Debug|Any CPU 14 | Debug|Mixed Platforms = Debug|Mixed Platforms 15 | Debug|x86 = Debug|x86 16 | Release|Any CPU = Release|Any CPU 17 | Release|Mixed Platforms = Release|Mixed Platforms 18 | Release|x86 = Release|x86 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 24 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 25 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Debug|x86.ActiveCfg = Debug|Any CPU 26 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 29 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Release|Mixed Platforms.Build.0 = Release|Any CPU 30 | {2A828141-9EF2-4A8A-8944-B2F2D1775CC9}.Release|x86.ActiveCfg = Release|Any CPU 31 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 34 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 35 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Debug|x86.ActiveCfg = Debug|Any CPU 36 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Release|Any CPU.Build.0 = Release|Any CPU 38 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 39 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Release|Mixed Platforms.Build.0 = Release|Any CPU 40 | {F1E03291-0C37-40F6-8AAF-9B471ADEEFA1}.Release|x86.ActiveCfg = Release|Any CPU 41 | EndGlobalSection 42 | GlobalSection(SolutionProperties) = preSolution 43 | HideSolutionNode = FALSE 44 | EndGlobalSection 45 | EndGlobal 46 | --------------------------------------------------------------------------------