diff --git a/src/Syncromatics.Clients.HoustonMetro.Api/HoustonMetroClient.cs b/src/Syncromatics.Clients.HoustonMetro.Api/HoustonMetroClient.cs index 7042bdb..12cedfe 100644 --- a/src/Syncromatics.Clients.HoustonMetro.Api/HoustonMetroClient.cs +++ b/src/Syncromatics.Clients.HoustonMetro.Api/HoustonMetroClient.cs @@ -22,10 +22,10 @@ public HoustonMetroClient(ClientSettings clientSettings) _client = new RestClient(httpClient).For(); } - public Task> GetArrivalsAsync(int stopId) => + public Task> GetArrivalsAsync(string stopId) => _client.GetArrivalsAsync(_settings.ApiKey, stopId); - public Task> GetRoutesAsync(int stopId) => + public Task> GetRoutesAsync(string stopId) => _client.GetRoutesAsync(_settings.ApiKey, stopId); } } diff --git a/src/Syncromatics.Clients.HoustonMetro.Api/IHoustonMetroApi.cs b/src/Syncromatics.Clients.HoustonMetro.Api/IHoustonMetroApi.cs index 42bdb00..e98556c 100644 --- a/src/Syncromatics.Clients.HoustonMetro.Api/IHoustonMetroApi.cs +++ b/src/Syncromatics.Clients.HoustonMetro.Api/IHoustonMetroApi.cs @@ -9,14 +9,14 @@ namespace Syncromatics.Clients.HoustonMetro.Api { internal interface IHoustonMetroApi { - [Get("data/Stops('MeTrAuOfHaCo_{stopId}')/Arrivals?$format=json")] + [Get("data/Stops('{stopId}')/Arrivals?$format=json")] Task> GetArrivalsAsync( [Header("Ocp-Apim-Subscription-Key")]string apiKey, - [Path]int stopId); + [Path]string stopId); - [Get("data/Stops('MeTrAuOfHaCo_{stopId}')/Routes?$format=json")] + [Get("data/Stops('{stopId}')/Routes?$format=json")] Task> GetRoutesAsync( [Header("Ocp-Apim-Subscription-Key")]string apiKey, - [Path]int stopId); + [Path]string stopId); } } diff --git a/src/Syncromatics.Clients.HoustonMetro.Api/IHoustonMetroClient.cs b/src/Syncromatics.Clients.HoustonMetro.Api/IHoustonMetroClient.cs index a8bdfae..9d21ba0 100644 --- a/src/Syncromatics.Clients.HoustonMetro.Api/IHoustonMetroClient.cs +++ b/src/Syncromatics.Clients.HoustonMetro.Api/IHoustonMetroClient.cs @@ -4,7 +4,7 @@ namespace Syncromatics.Clients.HoustonMetro.Api { public interface IHoustonMetroClient { - Task> GetArrivalsAsync(int stopId); - Task> GetRoutesAsync(int stopId); + Task> GetArrivalsAsync(string stopId); + Task> GetRoutesAsync(string stopId); } } diff --git a/test/Syncromatics.Clients.HoustonMetro.Api.Tests/Integration/HoustonMetroClientTests.cs b/test/Syncromatics.Clients.HoustonMetro.Api.Tests/Integration/HoustonMetroClientTests.cs index e1bacfc..01c2cf6 100644 --- a/test/Syncromatics.Clients.HoustonMetro.Api.Tests/Integration/HoustonMetroClientTests.cs +++ b/test/Syncromatics.Clients.HoustonMetro.Api.Tests/Integration/HoustonMetroClientTests.cs @@ -22,14 +22,14 @@ public HoustonMetroClientTests() } [Theory] - [InlineData(79)] - [InlineData(244)] - [InlineData(661)] - [InlineData(681)] - [InlineData(9045)] - [InlineData(9953)] - [InlineData(10055)] - public async Task ShouldGetArrivals(int stopId) + [InlineData("MeTrAuOfHaCo_79")] + [InlineData("MeTrAuOfHaCo_244")] + [InlineData("MeTrAuOfHaCo_661")] + [InlineData("MeTrAuOfHaCo_681")] + [InlineData("MeTrAuOfHaCo_9045")] + [InlineData("MeTrAuOfHaCo_9953")] + [InlineData("MeTrAuOfHaCo_10055")] + public async Task ShouldGetArrivals(string stopId) { Response result = null; await RetryPolicy().ExecuteAsync(async () => @@ -48,14 +48,14 @@ await RetryPolicy().ExecuteAsync(async () => } [Theory] - [InlineData(79)] - [InlineData(244)] - [InlineData(661)] - [InlineData(681)] - [InlineData(9045)] - [InlineData(9953)] - [InlineData(10055)] - public async Task ShouldGetRoutes(int stopId) + [InlineData("MeTrAuOfHaCo_79")] + [InlineData("MeTrAuOfHaCo_244")] + [InlineData("MeTrAuOfHaCo_661")] + [InlineData("MeTrAuOfHaCo_681")] + [InlineData("MeTrAuOfHaCo_9045")] + [InlineData("MeTrAuOfHaCo_9953")] + [InlineData("MeTrAuOfHaCo_10055")] + public async Task ShouldGetRoutes(string stopId) { Response result = null; await RetryPolicy().ExecuteAsync(async () =>