mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-22 04:46:30 +02:00
Version 3.0.364
This commit is contained in:
parent
91d42552c7
commit
0b9196a78d
91 changed files with 3452 additions and 555 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using Serilog;
|
||||
using TINK.Model.Connector;
|
||||
using TINK.Repository.Response;
|
||||
|
@ -22,7 +22,7 @@ namespace TINK.Repository
|
|||
|
||||
public static Version UnsupportedVersionUpper => UNSUPPORTEDFUTURECOPRIVERSIONUPPER;
|
||||
|
||||
/// <summary> Deserializes reponse JSON if response is of supported version or provides default response otherwise. </summary>
|
||||
/// <summary> Deserializes response JSON if response is of supported version or provides default response otherwise. </summary>
|
||||
/// <typeparam name="T">Type of response object.</typeparam>
|
||||
/// <param name="response">Response JSON.</param>
|
||||
/// <param name="emptyResponseFactory">Factory providing default delegate.</param>
|
||||
|
|
|
@ -43,12 +43,12 @@ namespace TINK.Repository.Request
|
|||
|
||||
/// <summary> Gets reservation request (synonym: reservation == request == reservieren). </summary>
|
||||
/// <param name="bikeId">Id of the bike to reserve.</param>
|
||||
/// <returns>Requst to reserve bike.</returns>
|
||||
/// <returns>Request to reserve bike.</returns>
|
||||
string DoReserve(string bikeId);
|
||||
|
||||
/// <summary> Gets request to cancel reservation. </summary>
|
||||
/// <param name="bikeId">Id of the bike to cancel reservation for.</param>
|
||||
/// <returns>Requst on cancel booking request.</returns>
|
||||
/// <returns>Request on cancel booking request.</returns>
|
||||
string DoCancelReservation(string bikeId);
|
||||
|
||||
/// <summary> Request to get keys. </summary>
|
||||
|
@ -96,17 +96,17 @@ namespace TINK.Repository.Request
|
|||
/// <summary> Gets request for returning the bike. </summary>
|
||||
/// <param name="bikeId">Id of the bike to return.</param>
|
||||
/// <param name="location">Geolocation of lock when returning bike.</param>
|
||||
/// <returns>Requst on returning request.</returns>
|
||||
/// <returns>Request on returning request.</returns>
|
||||
string DoReturn(string bikeId, LocationDto location);
|
||||
|
||||
/// <summary> Returns a bike and starts closing. </summary>
|
||||
/// <param name="bikeId">Id of the bike to return.</param>
|
||||
/// <param name="smartDevice">Provides info about hard and software.</param>
|
||||
/// <returns>Response to send to corpi.</returns>
|
||||
/// <returns>Response to send to copri.</returns>
|
||||
string ReturnAndStartClosing(string bikeId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets request for submiting feedback to copri server.
|
||||
/// Gets request for submitting feedback to copri server.
|
||||
/// </summary>
|
||||
/// <param name="bikeId">Id of the bike to which the feedback is related to.</param>
|
||||
/// <param name="currentChargeBars">Null if bike has no engine or charge is unknown. Otherwise the charge filling level of the drive battery.</param>
|
||||
|
@ -119,7 +119,7 @@ namespace TINK.Repository.Request
|
|||
bool isBikeBroken = false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets request for submiting mini survey to copri server.
|
||||
/// Gets request for submitting mini survey to copri server.
|
||||
/// </summary>
|
||||
/// <param name="answers">Collection of answers.</param>
|
||||
string DoSubmitMiniSurvey(IDictionary<string, string> answers);
|
||||
|
|
|
@ -139,7 +139,7 @@ namespace TINK.Repository.Request
|
|||
/// <summary> Returns a bike and starts closing. </summary>
|
||||
/// <param name="bikeId">Id of the bike to return.</param>
|
||||
/// <param name="smartDevice">Provides info about hard and software.</param>
|
||||
/// <returns>Response to send to corpi.</returns>
|
||||
/// <returns>Response to send to copri.</returns>
|
||||
public string ReturnAndStartClosing(string bikeId)
|
||||
=> throw new NotSupportedException();
|
||||
|
||||
|
@ -152,7 +152,7 @@ namespace TINK.Repository.Request
|
|||
=> throw new NotSupportedException();
|
||||
|
||||
/// <summary>
|
||||
/// Gets request for submiting mini survey to copri server.
|
||||
/// Gets request for submitting mini survey to copri server.
|
||||
/// </summary>
|
||||
/// <param name="answers">Collection of answers.</param>
|
||||
public string DoSubmitMiniSurvey(IDictionary<string, string> answers) =>
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace TINK.Repository.Request
|
|||
private ISmartDevice SmartDevice { get; }
|
||||
|
||||
/// <summary> Gets request to log user in. </summary>
|
||||
/// <param name="mailAddress">Mailaddress of user to log in.</param>
|
||||
/// <param name="mailAddress">Mail address of user to log in.</param>
|
||||
/// <param name="password">Password to log in.</param>
|
||||
/// <param name="deviceId">Id specifying user and hardware.</param>
|
||||
/// <remarks>Response which holds auth cookie <see cref="ResponseBase.authcookie"/></remarks>
|
||||
|
@ -96,7 +96,7 @@ namespace TINK.Repository.Request
|
|||
/// <summary> Gets reservation request (synonym: reservation == request == reservieren). </summary>
|
||||
/// <remarks> Operator specific call.</remarks>
|
||||
/// <param name="bikeId">Id of the bike to reserve.</param>
|
||||
/// <returns>Requst to reserve bike.</returns>
|
||||
/// <returns>Request to reserve bike.</returns>
|
||||
public string DoReserve(string bikeId)
|
||||
=> "request=booking_request" +
|
||||
GetBikeIdParameter(bikeId) +
|
||||
|
@ -107,7 +107,7 @@ namespace TINK.Repository.Request
|
|||
/// <summary> Gets request to cancel reservation. </summary>
|
||||
/// <remarks> Operator specific call.</remarks>
|
||||
/// <param name="bikeId">Id of the bike to cancel reservation for.</param>
|
||||
/// <returns>Requst on cancel booking request.</returns>
|
||||
/// <returns>Request on cancel booking request.</returns>
|
||||
public string DoCancelReservation(string bikeId)
|
||||
=> "request=booking_cancel" +
|
||||
GetBikeIdParameter(bikeId) +
|
||||
|
@ -158,7 +158,7 @@ namespace TINK.Repository.Request
|
|||
UiIsoLanguageNameParameter;
|
||||
|
||||
|
||||
/// <summary> Gets booking request request (synonym: booking == renting == mieten). </summary>
|
||||
/// <summary> Gets booking request (synonym: booking == renting == mieten). </summary>
|
||||
/// <remarks> Operator specific call.</remarks>
|
||||
/// <param name="bikeId">Id of the bike to book.</param>
|
||||
/// <param name="guid">Used to publish GUID from app to copri. Used for initial setup of bike in copri.</param>
|
||||
|
@ -202,7 +202,7 @@ namespace TINK.Repository.Request
|
|||
/// <remarks> Operator specific call.</remarks>
|
||||
/// <param name="bikeId">Id of bike to return.</param>
|
||||
/// <param name="geolocation">Geolocation of lock when returning bike.</param>
|
||||
/// <returns>Requst on returning request.</returns>
|
||||
/// <returns>Request on returning request.</returns>
|
||||
public string DoReturn(string bikeId, LocationDto geolocation)
|
||||
=> "request=booking_update" +
|
||||
GetBikeIdParameter(bikeId) +
|
||||
|
@ -218,7 +218,7 @@ namespace TINK.Repository.Request
|
|||
/// <summary> Returns a bike and starts closing. </summary>
|
||||
/// <param name="bikeId">Id of the bike to return.</param>
|
||||
/// <param name="smartDevice">Provides info about hard and software.</param>
|
||||
/// <returns>Response to send to corpi.</returns>
|
||||
/// <returns>Response to send to copri.</returns>
|
||||
public string ReturnAndStartClosing(string bikeId)
|
||||
=> "request=booking_update" +
|
||||
GetBikeIdParameter(bikeId) +
|
||||
|
@ -258,7 +258,7 @@ namespace TINK.Repository.Request
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets request for submiting mini survey to copri server.
|
||||
/// Gets request for submitting mini survey to copri server.
|
||||
/// </summary>
|
||||
/// <param name="answers">Collection of answers.</param>
|
||||
public string DoSubmitMiniSurvey(IDictionary<string, string> answers)
|
||||
|
@ -313,7 +313,7 @@ namespace TINK.Repository.Request
|
|||
|
||||
/// <summary> Gets the geolocation parameter. </summary>
|
||||
/// <param name="geolocation">Geolocation or null.</param>
|
||||
/// <returns>Empty string if geoloction is null otherwise parmeter including latitude, longitude and age in a format which is urlencode invariant.</returns>
|
||||
/// <returns>Empty string if geolocation is null otherwise parameter including latitude, longitude and age in a format which is urlencode invariant.</returns>
|
||||
private static string GetLocationParameters(LocationDto geolocation)
|
||||
{
|
||||
if (geolocation == null)
|
||||
|
|
21
TINKLib/Repository/Response/Stations/Station/BikeGroup.cs
Normal file
21
TINKLib/Repository/Response/Stations/Station/BikeGroup.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System.Runtime.Serialization;
|
||||
|
||||
namespace TINK.Repository.Response.Stations.Station
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds a single bike group.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class BikeGroup
|
||||
{
|
||||
/// <summary> Holds the count of bikes for the group. </summary>
|
||||
[DataMember]
|
||||
public string bike_count { get; private set;}
|
||||
|
||||
/// <summary>
|
||||
/// Holds the group identifying the bike group type.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string bike_group { get; private set; }
|
||||
}
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace TINK.Repository.Response.Stations.Station
|
||||
|
@ -28,5 +29,17 @@ namespace TINK.Repository.Response.Stations.Station
|
|||
|
||||
[DataMember]
|
||||
public OperatorData operator_data { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the count of available bikes at the station.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string bike_count { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the count type of station, i.e. which bikes are located at station.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Dictionary<string, BikeGroup> station_type { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,5 +15,11 @@ namespace TINK.Repository.Response.Stations
|
|||
/// </summary>
|
||||
[DataMember]
|
||||
public Dictionary<string, StationInfo> stations { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary of bikes reserved (requested) and rented (occupied) by current user if user is logged in and has reserved or rented bikes.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Dictionary<string, BikeInfoReservedOrBooked> bikes_occupied { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue