mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-16 15:16:34 +01:00
38 lines
1.6 KiB
C#
38 lines
1.6 KiB
C#
|
|
|||
|
using System;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using TINK.Model.Repository;
|
|||
|
using TINK.Model.Repository.Response;
|
|||
|
|
|||
|
namespace TINK.Model.Services.CopriApi
|
|||
|
{
|
|||
|
/// <summary> Manages cache which holds copri data.</summary>
|
|||
|
public interface ICachedCopriServer : ICopriServerBase
|
|||
|
{
|
|||
|
/// <summary> Get list of stations. </summary>
|
|||
|
/// <returns>List of all stations.</returns>
|
|||
|
Task<Result<StationsAllResponse>> GetStations(bool fromCache = false);
|
|||
|
|
|||
|
/// <summary> Gets a list of bikes from Copri. </summary>
|
|||
|
/// <returns>Response holding list of bikes.</returns>
|
|||
|
Task<Result<BikesAvailableResponse>> GetBikesAvailable(bool fromCache = false);
|
|||
|
|
|||
|
/// <summary> Gets a list of bikes reserved/ booked by acctive user from Copri.</summary>
|
|||
|
/// <returns>Response holding list of bikes.</returns>
|
|||
|
Task<Result<BikesReservedOccupiedResponse>> GetBikesOccupied(bool fromCache = false);
|
|||
|
|
|||
|
/// <summary>Adds https--response to cache if response is ok. </summary>
|
|||
|
/// <param name="response">Response to add to cache.</param>
|
|||
|
void AddToCache(Result<StationsAllResponse> result);
|
|||
|
|
|||
|
/// <summary>Adds https--response to cache if response is ok. </summary>
|
|||
|
/// <param name="response">Response to add to cache.</param>
|
|||
|
void AddToCache(Result<BikesAvailableResponse> result);
|
|||
|
|
|||
|
/// <summary>Adds https--response to cache if response is ok. </summary>
|
|||
|
/// <param name="response">Response to add to cache.</param>
|
|||
|
/// <returns></returns>
|
|||
|
void AddToCache(Result<BikesReservedOccupiedResponse> result);
|
|||
|
}
|
|||
|
}
|