using System;
using System.Threading.Tasks;
using TINK.Repository;
using TINK.Repository.Response;
using TINK.Repository.Response.Stations;
namespace TINK.Model.Services.CopriApi
{
/// Manages cache which holds copri data.
public interface ICachedCopriServer : ICopriServerBase
{
/// Get list of stations.
/// List of all stations.
Task> GetStations(bool fromCache = false);
/// Gets a list of bikes from Copri.
/// Uri of the operator host to get bikes from or null if bikes have to be gotten form primary host.
/// Id of station which is used for filtering bikes. Null if no filtering should be applied.
/// Id of bike which is used for filtering bikes. Null if no filtering should be applied.
/// Response holding list of bikes.
Task> GetBikesAvailable(
bool fromCache = false,
Uri operatorUri = null,
string stationId = null,
string bikeId = null);
/// Gets a list of bikes reserved/ booked by active user from Copri.
/// Response holding list of bikes.
Task> GetBikesOccupied(bool fromCache = false);
/// Adds https--response to cache if response is ok.
/// Response to add to cache.
void AddToCache(Result result);
/// Adds https--response to cache if response is ok.
/// Response to add to cache.
/// Uri of the operator host to get bikes from or null if bikes have to be gotten form primary host.
/// Id of station which is used for filtering bikes. Null if no filtering should be applied.
/// Id of bike which is used for filtering bikes. Null if no filtering should be applied.
void AddToCache(
Result result,
Uri operatorUri = null,
string stationId = null,
string bikeId = null);
/// Adds https--response to cache if response is ok.
/// Response to add to cache.
///
void AddToCache(Result result);
}
}