sharee.bike-App/TINKLib/Model/Connector/Query/IQuery.cs

23 lines
881 B
C#
Raw Normal View History

2023-11-06 12:23:09 +01:00
using System;
2023-04-19 12:14:14 +02:00
using System.Threading.Tasks;
2022-08-30 15:42:25 +02:00
using TINK.Model.Bikes;
2021-05-13 20:03:07 +02:00
using TINK.Model.Services.CopriApi;
namespace TINK.Model.Connector
{
2022-09-06 16:08:19 +02:00
public interface IQuery
{
2023-04-19 12:14:14 +02:00
/// <summary> Gets all stations including positions.</summary>
2022-09-06 16:08:19 +02:00
Task<Result<StationsAndBikesContainer>> GetBikesAndStationsAsync();
2021-05-13 20:03:07 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Gets bikes occupied is a user is logged in. </summary>
/// <returns>Collection of bikes.</returns>
Task<Result<BikeCollection>> GetBikesOccupiedAsync();
2021-05-13 20:03:07 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Gets bikes either bikes available if no user is logged in or bikes available and bikes occupied if a user is logged in. </summary>
2023-11-06 12:23:09 +01:00
/// <param name="operatorUri">Uri of the operator host to get bikes from or null if bikes have to be gotten form primary host.</param>
2022-09-06 16:08:19 +02:00
/// <returns>Collection of bikes.</returns>
2023-11-06 12:23:09 +01:00
Task<Result<BikeCollection>> GetBikesAsync(Uri operatorUri = null);
2022-09-06 16:08:19 +02:00
}
2021-05-13 20:03:07 +02:00
}