using System;
using System.Threading.Tasks;
using ShareeBike.Repository;
using ShareeBike.Repository.Response;
using ShareeBike.Repository.Response.Stations;
namespace ShareeBike.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);
}
}