mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-07-07 20:16:44 +02:00
Version 3.0.376
This commit is contained in:
parent
ca080c87c0
commit
f963c0a219
158 changed files with 3228 additions and 1279 deletions
|
@ -34,8 +34,10 @@ namespace TINK.Repository.Request
|
|||
string GetStations();
|
||||
|
||||
/// <summary>Gets bikes available.</summary>
|
||||
/// <param name="stationId"> Id of station which is used for filtering bikes. Null if no filtering should be applied.</param>
|
||||
/// <param name="bikeId"> Id of bike to get.</param>
|
||||
/// <returns>Request to query list of bikes available.</returns>
|
||||
string GetBikesAvailable();
|
||||
string GetBikesAvailable(string stationId = null, string bikeId = null);
|
||||
|
||||
/// <summary> Gets a list of bikes reserved/ booked by active user from Copri.</summary>
|
||||
/// <returns>Request to query list of bikes occupied.</returns>
|
||||
|
|
|
@ -67,9 +67,13 @@ namespace TINK.Repository.Request
|
|||
=> throw new CallNotRequiredException();
|
||||
|
||||
/// <summary>Gets bikes available.</summary>
|
||||
/// <param name="stationId"> Id of station which is used for filtering bikes. Null if no filtering should be applied.</param>
|
||||
/// <param name="bikeId"> Id of bike to get.</param>
|
||||
/// <returns>Request to query list of bikes available.</returns>
|
||||
public string GetBikesAvailable()
|
||||
public string GetBikesAvailable(string stationId = null, string bikeId = null)
|
||||
=> "request=bikes_available&system=all" +
|
||||
stationId.GetStationId() +
|
||||
bikeId.GetBikeId() +
|
||||
AuthCookieParameter +
|
||||
UiIsoLanguageNameParameter;
|
||||
|
||||
|
|
|
@ -65,5 +65,19 @@ namespace TINK.Repository.Request
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets the station id filter. </summary>
|
||||
/// <returns>Station id filter.</returns>
|
||||
public static string GetStationId(this string stationId)
|
||||
=> !string.IsNullOrEmpty(stationId)
|
||||
? $"&station={WebUtility.UrlEncode(stationId)}"
|
||||
: string.Empty;
|
||||
|
||||
/// <summary> Gets the bike id filter. </summary>
|
||||
/// <returns>Bike id filter.</returns>
|
||||
public static string GetBikeId(this string bikeId)
|
||||
=> !string.IsNullOrEmpty(bikeId)
|
||||
? $"&bike={WebUtility.UrlEncode(bikeId)}"
|
||||
: string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,9 +72,13 @@ namespace TINK.Repository.Request
|
|||
UiIsoLanguageNameParameter;
|
||||
|
||||
/// <summary>Gets bikes available.</summary>
|
||||
/// <param name="stationId"> Id of station which is used for filtering bikes. Null if no filtering should be applied.</param>
|
||||
/// <param name="bikeId"> Id of bike to get.</param>
|
||||
/// <returns>Request to query list of bikes available.</returns>
|
||||
public string GetBikesAvailable()
|
||||
public string GetBikesAvailable(string stationId = null, string bikeId = null)
|
||||
=> "request=bikes_available&system=all" +
|
||||
stationId.GetStationId() +
|
||||
bikeId.GetBikeId() +
|
||||
AuthCookieParameter +
|
||||
UiIsoLanguageNameParameter;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue