-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from Enixor/master
Battlegroups
- Loading branch information
Showing
10 changed files
with
149 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
|
||
namespace WowDotNetAPI.Models | ||
{ | ||
[DataContract] | ||
public class BattlegroupData | ||
{ | ||
[DataMember(Name = "battlegroups")] | ||
public IEnumerable<BattlegroupInfo> Battlegroups { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Runtime.Serialization; | ||
|
||
namespace WowDotNetAPI.Models | ||
{ | ||
[DataContract] | ||
public class BattlegroupInfo | ||
{ | ||
[DataMember(Name = "name")] | ||
public string Name { get; set; } | ||
|
||
[DataMember(Name = "slug")] | ||
public string SLUG { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
|
||
namespace WowDotNetAPI.Models | ||
{ | ||
[DataContract] | ||
public class ItemClassData | ||
{ | ||
[DataMember(Name = "classes")] | ||
public IEnumerable<ItemClassInfo> Classes { get; set; } | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Runtime.Serialization; | ||
|
||
namespace WowDotNetAPI.Models | ||
{ | ||
[DataContract] | ||
public class ItemClassInfo | ||
{ | ||
[DataMember(Name = "class")] | ||
public int Class { get; set; } | ||
|
||
[DataMember(Name = "name")] | ||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace WowDotNetAPI.Utilities | ||
{ | ||
public static class DataUtility | ||
{ | ||
public const string characterRacesPath = "/api/wow/data/character/races"; | ||
public const string characterClassesPath = "/api/wow/data/character/classes"; | ||
public const string guildRewardsPath = "/api/wow/data/guild/rewards"; | ||
public const string guildPerksPath = "/api/wow/data/guild/perks"; | ||
public const string itemsPath = "/api/wow/data/item/"; | ||
|
||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace WowDotNetAPI.Utilities | ||
{ | ||
public static class DataUtility | ||
{ | ||
public const string characterRacesPath = "/api/wow/data/character/races"; | ||
public const string characterClassesPath = "/api/wow/data/character/classes"; | ||
public const string guildRewardsPath = "/api/wow/data/guild/rewards"; | ||
public const string guildPerksPath = "/api/wow/data/guild/perks"; | ||
public const string itemsPath = "/api/wow/data/item/"; | ||
public const string itemClassesPath = "/api/wow/data/item/classes"; | ||
public const string battlegroundPath = "/api/wow/data/battlegroups/"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace WowDotNetAPI.Utilities | ||
{ | ||
public static class GuildUtility | ||
{ | ||
public const string basePath = "/api/wow/guild/"; | ||
public const string rewardsPath = "/api/wow/data/guild/rewards"; | ||
public const string perksPath = "/api/wow/data/guild/perks"; | ||
|
||
public static string buildOptionalQuery(GuildOptions realmOptions) | ||
{ | ||
string query = "&fields="; | ||
List<string> tmp = new List<string>(); | ||
|
||
if ((realmOptions & GuildOptions.GetMembers) == GuildOptions.GetMembers) | ||
tmp.Add("members"); | ||
|
||
if ((realmOptions & GuildOptions.GetAchievements) == GuildOptions.GetAchievements) | ||
tmp.Add("achievements"); | ||
|
||
if (tmp.Count == 0) return string.Empty; | ||
|
||
query += string.Join(",", tmp.ToArray()); | ||
|
||
return query; | ||
} | ||
|
||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace WowDotNetAPI.Utilities | ||
{ | ||
public static class GuildUtility | ||
{ | ||
public const string basePath = "/api/wow/guild/"; | ||
public const string rewardsPath = "/api/wow/data/guild/rewards"; | ||
public const string perksPath = "/api/wow/data/guild/perks"; | ||
|
||
public static string buildOptionalQuery(GuildOptions realmOptions) | ||
{ | ||
string query = "&fields="; | ||
List<string> tmp = new List<string>(); | ||
|
||
if ((realmOptions & GuildOptions.GetMembers) == GuildOptions.GetMembers) | ||
tmp.Add("members"); | ||
|
||
if ((realmOptions & GuildOptions.GetAchievements) == GuildOptions.GetAchievements) | ||
tmp.Add("achievements"); | ||
|
||
if ((realmOptions & GuildOptions.GetNews) == GuildOptions.GetNews) | ||
tmp.Add("news"); | ||
|
||
if (tmp.Count == 0) return string.Empty; | ||
|
||
query += string.Join(",", tmp.ToArray()); | ||
|
||
return query; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters