Skip to content

Commit 06bf1b7

Browse files
author
babelshift
committed
Extracting interfaces for the service implementations.
1 parent 3e9ba18 commit 06bf1b7

34 files changed

Lines changed: 287 additions & 16 deletions

SteamWebAPI2.Net452/SteamWebAPI2.Net452.csproj

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,54 @@
7979
<Compile Include="..\SteamWebAPI2\Interfaces\GCVersion.cs">
8080
<Link>Interfaces\GCVersion.cs</Link>
8181
</Compile>
82+
<Compile Include="..\SteamWebAPI2\Interfaces\ICSGOServers.cs">
83+
<Link>Interfaces\ICSGOServers.cs</Link>
84+
</Compile>
85+
<Compile Include="..\SteamWebAPI2\Interfaces\IDOTA2Econ.cs">
86+
<Link>Interfaces\IDOTA2Econ.cs</Link>
87+
</Compile>
88+
<Compile Include="..\SteamWebAPI2\Interfaces\IDOTA2Fantasy.cs">
89+
<Link>Interfaces\IDOTA2Fantasy.cs</Link>
90+
</Compile>
91+
<Compile Include="..\SteamWebAPI2\Interfaces\IDOTA2Match.cs">
92+
<Link>Interfaces\IDOTA2Match.cs</Link>
93+
</Compile>
94+
<Compile Include="..\SteamWebAPI2\Interfaces\IDOTA2Ticket.cs">
95+
<Link>Interfaces\IDOTA2Ticket.cs</Link>
96+
</Compile>
97+
<Compile Include="..\SteamWebAPI2\Interfaces\IEconItems.cs">
98+
<Link>Interfaces\IEconItems.cs</Link>
99+
</Compile>
100+
<Compile Include="..\SteamWebAPI2\Interfaces\IGCVersion.cs">
101+
<Link>Interfaces\IGCVersion.cs</Link>
102+
</Compile>
103+
<Compile Include="..\SteamWebAPI2\Interfaces\IPlayerService.cs">
104+
<Link>Interfaces\IPlayerService.cs</Link>
105+
</Compile>
106+
<Compile Include="..\SteamWebAPI2\Interfaces\ISteamApps.cs">
107+
<Link>Interfaces\ISteamApps.cs</Link>
108+
</Compile>
109+
<Compile Include="..\SteamWebAPI2\Interfaces\ISteamEconomy.cs">
110+
<Link>Interfaces\ISteamEconomy.cs</Link>
111+
</Compile>
112+
<Compile Include="..\SteamWebAPI2\Interfaces\ISteamNews.cs">
113+
<Link>Interfaces\ISteamNews.cs</Link>
114+
</Compile>
115+
<Compile Include="..\SteamWebAPI2\Interfaces\ISteamRemoteStorage.cs">
116+
<Link>Interfaces\ISteamRemoteStorage.cs</Link>
117+
</Compile>
118+
<Compile Include="..\SteamWebAPI2\Interfaces\ISteamUser.cs">
119+
<Link>Interfaces\ISteamUser.cs</Link>
120+
</Compile>
121+
<Compile Include="..\SteamWebAPI2\Interfaces\ISteamUserStats.cs">
122+
<Link>Interfaces\ISteamUserStats.cs</Link>
123+
</Compile>
124+
<Compile Include="..\SteamWebAPI2\Interfaces\ISteamWebAPIUtil.cs">
125+
<Link>Interfaces\ISteamWebAPIUtil.cs</Link>
126+
</Compile>
127+
<Compile Include="..\SteamWebAPI2\Interfaces\ITFItems.cs">
128+
<Link>Interfaces\ITFItems.cs</Link>
129+
</Compile>
82130
<Compile Include="..\SteamWebAPI2\Interfaces\PlayerService.cs">
83131
<Link>Interfaces\PlayerService.cs</Link>
84132
</Compile>

SteamWebAPI2/Interfaces/CSGOServers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace SteamWebAPI2.Interfaces
66
/// <summary>
77
/// Represents a Steam Web API interface endpoint located at ICSGOServers_730
88
/// </summary>
9-
public class CSGOServers : SteamWebInterface
9+
public class CSGOServers : SteamWebInterface, ICSGOServers
1010
{
1111
/// <summary>
1212
/// Default constructor established the Steam Web API key and initializes for subsequent method calls

SteamWebAPI2/Interfaces/DOTA2Econ.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace SteamWebAPI2.Interfaces
88
{
9-
public class DOTA2Econ : SteamWebInterface
9+
public class DOTA2Econ : SteamWebInterface, IDOTA2Econ
1010
{
1111
public DOTA2Econ(string steamWebApiKey)
1212
: base(steamWebApiKey, "IEconDOTA2_570")

SteamWebAPI2/Interfaces/DOTA2Fantasy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace SteamWebAPI2.Interfaces
66
{
7-
public class DOTA2Fantasy : SteamWebInterface
7+
public class DOTA2Fantasy : SteamWebInterface, IDOTA2Fantasy
88
{
99
public DOTA2Fantasy(string steamWebApiKey)
1010
: base(steamWebApiKey, "IDOTA2Fantasy_570")

SteamWebAPI2/Interfaces/DOTA2Match.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace SteamWebAPI2.Interfaces
88
{
9-
public class DOTA2Match : SteamWebInterface
9+
public class DOTA2Match : SteamWebInterface, IDOTA2Match
1010
{
1111
public DOTA2Match(string steamWebApiKey)
1212
: base(steamWebApiKey, "IDOTA2Match_570")

SteamWebAPI2/Interfaces/DOTA2Ticket.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace SteamWebAPI2.Interfaces
44
{
5-
public class DOTA2Ticket : SteamWebInterface
5+
public class DOTA2Ticket : SteamWebInterface, IDOTA2Ticket
66
{
77
public DOTA2Ticket(string steamWebApiKey)
88
: base(steamWebApiKey, "IDOTA2Ticket_570")

SteamWebAPI2/Interfaces/EconItems.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public enum EconItemsAppId
1717
Portal2_Beta = 841
1818
}
1919

20-
public class EconItems : SteamWebInterface
20+
public class EconItems : SteamWebInterface, IEconItems
2121
{
2222
private int appId;
2323

SteamWebAPI2/Interfaces/GCVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public enum GCVersionAppId
1212
CounterStrikeGO = 730
1313
}
1414

15-
public class GCVersion : SteamWebInterface
15+
public class GCVersion : SteamWebInterface, IGCVersion
1616
{
1717
private int appId;
1818

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System.Threading.Tasks;
2+
using SteamWebAPI2.Models.CSGO;
3+
4+
namespace SteamWebAPI2.Interfaces
5+
{
6+
public interface ICSGOServers
7+
{
8+
Task<ServerStatusResult> GetGameServerStatusAsync();
9+
}
10+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Collections.Generic;
2+
using System.Threading.Tasks;
3+
using SteamWebAPI2.Models.DOTA2;
4+
5+
namespace SteamWebAPI2.Interfaces
6+
{
7+
public interface IDOTA2Econ
8+
{
9+
Task<IReadOnlyCollection<GameItem>> GetGameItemsAsync(string language = "");
10+
Task<IReadOnlyCollection<Hero>> GetHeroesAsync(string language = "", bool itemizedOnly = false);
11+
Task<string> GetItemIconPathAsync(string iconName, string iconType = "");
12+
Task<RarityResult> GetRaritiesAsync(string language = "");
13+
void GetSteamAccountValidForEvent(int eventId, long steamId, string language = "");
14+
Task<PrizePoolResult> GetTournamentPrizePool(int? leagueId = null);
15+
}
16+
}

0 commit comments

Comments
 (0)