43 lines
2.0 KiB
C#
43 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using gehGassi.Dto.Common;
|
|
using gehGassiApp.Core.Interfaces.Synchronization;
|
|
using gehGassiApp.Domain.Common;
|
|
using gehGassiApp.Domain.News;
|
|
|
|
namespace gehGassiApp.Core.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Schnittstellenbeschreibung für einen Service der alle Funktionen rund um News zur Verfügung stellt
|
|
/// </summary>
|
|
public interface INewsService : IService<NewsCategory>, ISyncPushPullService<NewsCategory>
|
|
{
|
|
/// <summary>
|
|
/// Gibt eine Liste der aktuellen News Kategorien zurück.
|
|
/// Entweder von der DB oder vom Server
|
|
/// </summary>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="language">Gewünschte Sprache</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <returns>Liste der News Kategorien</returns>
|
|
Task<List<NewsCategory>> GetCategoriesAsync(string accessToken, string language, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Abrufen von News. Berücksichtigt auch den Standort.
|
|
/// </summary>
|
|
/// <param name="categoryId">Id der Kategorie. Leer wenn ohne gewünscht</param>
|
|
/// <param name="location">Aktuelle Position</param>
|
|
/// <param name="take">Wie viele News sollen abgerufen werden? -1 Wenn nicht anwenden.</param>
|
|
/// <param name="skip">Wie viele News sollen ausgelassen werden? -1 Wenn nicht anwenden.</param>
|
|
/// <param name="appMode">Akteuller Modus der App</param>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="language">Gewünschte Sprache</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <returns>Liste der News</returns>
|
|
Task<ListCommunicationResult<List<News>>> GetNewsAsync(string categoryId, LocationDto location, int take, int skip, AppMode appMode, string language, string accessToken, CancellationToken token);
|
|
}
|
|
}
|