mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
Version 3.0.337
This commit is contained in:
parent
fd0e63cf10
commit
573fe77e12
2336 changed files with 33688 additions and 86082 deletions
|
@ -5,18 +5,12 @@ namespace TINK.Repository.Response
|
|||
[DataContract]
|
||||
public class BikeInfoAvailable : BikeInfoBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Position of the bike.
|
||||
/// </summary>
|
||||
/// <summary>Mini survey for bikes which were rented before and for which feedback is pending.</summary>
|
||||
[DataMember]
|
||||
public Position gps { get; private set; }
|
||||
public MiniSurveyResponse user_miniquery { get; private set; }
|
||||
|
||||
/// <summary> Information about Co2- saving for bikes which were rented before and for which feedback is pending.</summary>
|
||||
[DataMember]
|
||||
/// <summary> Full advertisement name.</summary>
|
||||
public string Ilockit_ID { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
/// <summary> Full advertisement name.</summary>
|
||||
public string Ilockit_GUID { get; private set; }
|
||||
public string co2saving { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace TINK.Repository.Response
|
||||
{
|
||||
|
@ -14,6 +14,12 @@ namespace TINK.Repository.Response
|
|||
[DataMember]
|
||||
public string bike { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Position of the bike.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Position gps { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id of the station.
|
||||
/// </summary>
|
||||
|
@ -68,6 +74,10 @@ namespace TINK.Repository.Response
|
|||
[DataMember]
|
||||
public RentalDescription rental_description { get; private set; }
|
||||
#endif
|
||||
[DataMember]
|
||||
/// <summary> Describes type of the bike.</summary>
|
||||
public BikeType bike_type { get; private set; }
|
||||
|
||||
/// <summary> Loading state of motor battery in % ]0..100[. </summary>
|
||||
[DataMember]
|
||||
public string bike_charge { get; private set; }
|
||||
|
@ -76,6 +86,14 @@ namespace TINK.Repository.Response
|
|||
[DataMember]
|
||||
public string lock_state { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
/// <summary> Full advertisement name.</summary>
|
||||
public string Ilockit_ID { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
/// <summary> Full advertisement name.</summary>
|
||||
public string Ilockit_GUID { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Textual description of response.
|
||||
/// </summary>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace TINK.Repository.Response
|
||||
{
|
||||
[DataContract]
|
||||
public class BikeInfoReservedOrBooked : BikeInfoAvailable
|
||||
public class BikeInfoReservedOrBooked : BikeInfoBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Date from when bike was reserved from/ booked from.
|
||||
|
@ -26,7 +26,7 @@ namespace TINK.Repository.Response
|
|||
|
||||
[DataMember]
|
||||
/// <summary> Key for connect to bluetooth lock as admin.</summary>
|
||||
public string K_a { get; private set;}
|
||||
public string K_a { get; private set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
85
TINKLib/Repository/Response/BikeType.cs
Normal file
85
TINKLib/Repository/Response/BikeType.cs
Normal file
|
@ -0,0 +1,85 @@
|
|||
using System.Runtime.Serialization;
|
||||
|
||||
namespace TINK.Repository.Response
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds info about a single bike.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class BikeType
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds the engine.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class Engine
|
||||
{
|
||||
/// <summary>
|
||||
/// Manufacturer: ...
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string manufacturer { get; private set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Holds the engine.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class Battery
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds the current charging level in bars.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string charge_current_bars { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the current charging level of the battery in percent.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string charge_current_percent { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the maximum chargeing level of the battery in bars.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string charge_max_bars { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds whether backend is aware of battery charging level.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string backend_accessible { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds whether to display battery level or not.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string hidden { get; private set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Category of the bike. Possible entries: "city", "cargo", ...
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string category { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Count of wheels. There are trikes (3 wheels) and two wheeled bikes.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string wheels { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds engine information. .
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Engine engine { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds battery information .
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Battery battery { get; private set; }
|
||||
}
|
||||
}
|
|
@ -13,6 +13,6 @@ namespace TINK.Repository.Response
|
|||
/// Dictionary of bikes.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Dictionary<string, BikeInfoAvailable> bikes { get; private set; }
|
||||
public Dictionary<string, BikeInfoAvailable> bikes { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,5 @@ namespace TINK.Repository.Response
|
|||
|
||||
[DataMember]
|
||||
public string co2saving { get; private set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,32 +3,32 @@ using System.Runtime.Serialization;
|
|||
|
||||
namespace TINK.Repository.Response
|
||||
{
|
||||
[DataContract]
|
||||
public class MiniSurveyResponse
|
||||
{
|
||||
[DataContract]
|
||||
public class MiniSurveyResponse
|
||||
public class Question
|
||||
{
|
||||
[DataContract]
|
||||
public class Question
|
||||
{
|
||||
[DataMember]
|
||||
public string quest_text { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string type { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public Dictionary<string, string> query { get; private set; }
|
||||
}
|
||||
[DataMember]
|
||||
public string quest_text { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string title { get; private set; }
|
||||
public string type { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string subtitle { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string footer { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public Dictionary<string, Question> questions { get; private set; }
|
||||
public Dictionary<string, string> query { get; private set; }
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string title { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string subtitle { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string footer { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public Dictionary<string, Question> questions { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,13 +27,15 @@ namespace TINK.Repository.Response
|
|||
public Dictionary<
|
||||
string /* Key of tariff object for sorting purposes*/,
|
||||
string[] /* Holds two Elements: first element is the description of the element (example: "Max Gebühr"), second is the value (example: "9.00 € / Tag")*/>
|
||||
tarif_elements { get; private set; }
|
||||
tarif_elements
|
||||
{ get; private set; }
|
||||
|
||||
/// <summary> Holds tariff entires to show to user.</summary>
|
||||
[DataMember]
|
||||
public Dictionary<
|
||||
string /* Key of info object for sorting purposes*/,
|
||||
string[] /* Holds two Elements: first element is the key of the element (example: "Tracking"), second is the value (example: "Ich stimme der Speicherung (Tracking) meiner Fahrstrecke ....")*/>
|
||||
rental_info { get; private set; }
|
||||
rental_info
|
||||
{ get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace TINK.Repository.Response
|
|||
|
||||
/// <summary> Url of page holding tariff info. </summary>
|
||||
[DataMember]
|
||||
public string tariff_info_html { get; private set; }
|
||||
public string tariff_info_html { get; private set; }
|
||||
|
||||
/// <summary> Textual description of response. </summary>
|
||||
public new string ToString()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.Linq;
|
||||
using TINK.Repository.Exception;
|
||||
using TINK.MultilingualResources;
|
||||
using TINK.Repository.Exception;
|
||||
|
||||
namespace TINK.Repository.Response
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ namespace TINK.Repository.Response
|
|||
/// <param name="p_oResponse">Response to check whether it is valid.</param>
|
||||
/// <returns></returns>
|
||||
public static AuthorizationoutResponse GetIsResponseOk(this AuthorizationoutResponse p_oResponse)
|
||||
{
|
||||
{
|
||||
if (AuthcookieNotDefinedException.IsAuthcookieNotDefined(p_oResponse, BIKES_LOGOUT_ACTIONTEXT, out AuthcookieNotDefinedException exception))
|
||||
{
|
||||
throw exception;
|
||||
|
@ -71,7 +71,7 @@ namespace TINK.Repository.Response
|
|||
if (p_oResponse.authcookie != "1")
|
||||
{
|
||||
throw new InvalidResponseException<AuthorizationoutResponse>(
|
||||
BIKES_LOGOUT_ACTIONTEXT,
|
||||
BIKES_LOGOUT_ACTIONTEXT,
|
||||
p_oResponse);
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ namespace TINK.Repository.Response
|
|||
{
|
||||
throw exception;
|
||||
}
|
||||
|
||||
|
||||
// Get bike which has to be booked.
|
||||
var bikeInfoRequestedOccupied = bookingResponse?.bikes_occupied?.Values?.FirstOrDefault(x => x.bike == bikeId);
|
||||
if (bikeInfoRequestedOccupied == null)
|
||||
|
@ -162,7 +162,7 @@ namespace TINK.Repository.Response
|
|||
/// <param name="response">Response to verify.</param>
|
||||
/// <param name="textOfAction">Text describing request which is shown if validation fails.</param>
|
||||
/// <returns>Verified response.</returns>
|
||||
public static T GetIsResponseOk<T>(this T response, string textOfAction) where T : ResponseBase
|
||||
public static T GetIsResponseOk<T>(this T response, string textOfAction) where T : ResponseBase
|
||||
{
|
||||
if (response == null || response.response_state == null)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace TINK.Repository.Response
|
|||
{
|
||||
[DataContract]
|
||||
public class VersionindependentResponse
|
||||
{
|
||||
{
|
||||
private CopriVersion _shareejson;
|
||||
|
||||
/// <summary> Root element for versions 4.0 and older. </summary>
|
||||
|
@ -13,7 +13,7 @@ namespace TINK.Repository.Response
|
|||
|
||||
/// <summary> Root element from 4.1 and later. </summary>
|
||||
[DataMember]
|
||||
public CopriVersion shareejson
|
||||
public CopriVersion shareejson
|
||||
{
|
||||
get => _shareejson ?? tinkjson;
|
||||
private set { _shareejson = value; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue