This repository has been archived by the owner on Jan 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(+semver: feature) Add support for getting routes by stop id (#4)
- Loading branch information
1 parent
bdd88a1
commit e851eec
Showing
11 changed files
with
75 additions
and
47 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
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
9 changes: 3 additions & 6 deletions
9
src/Syncromatics.Clients.HoustonMetro.Api/IHoustonMetroClient.cs
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,13 +1,10 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using RestEase; | ||
using System.Threading.Tasks; | ||
|
||
namespace Syncromatics.Clients.HoustonMetro.Api | ||
{ | ||
public interface IHoustonMetroClient | ||
{ | ||
Task<Stop> GetArrivalsAsync(int stopId); | ||
Task<Response<Arrival>> GetArrivalsAsync(int stopId); | ||
Task<Response<Route>> GetRoutesAsync(int stopId); | ||
} | ||
} |
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,10 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Syncromatics.Clients.HoustonMetro.Api | ||
{ | ||
public class Response<TResult> where TResult : class | ||
{ | ||
[JsonProperty("d")] | ||
public ResultSet<TResult> ResultSet { 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,13 +1,11 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Syncromatics.Clients.HoustonMetro.Api | ||
{ | ||
public class ResultSet | ||
public class ResultSet<TResult> where TResult : class | ||
{ | ||
[JsonProperty("results")] | ||
public List<Arrival> Arrivals { get; set; } | ||
public List<TResult> Results { 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,11 @@ | ||
namespace Syncromatics.Clients.HoustonMetro.Api | ||
{ | ||
public class Route | ||
{ | ||
public string AgencyAbbreviation { get; set; } | ||
public string LongName { get; set; } | ||
public string RouteId { get; set; } | ||
public string RouteName { get; set; } | ||
public string RouteType { get; set; } | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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