diff --git a/src/OnePeek.Api/IOnePeekApi.cs b/src/OnePeek.Api/IOnePeekApi.cs index 1e5ba16..bf1a10f 100644 --- a/src/OnePeek.Api/IOnePeekApi.cs +++ b/src/OnePeek.Api/IOnePeekApi.cs @@ -9,13 +9,79 @@ namespace OnePeek.Api { public interface IOnePeekApi { + /// + /// Returns a stream for a store image. + /// + /// The urn (is part of the AppImage). + /// Crops the image accordingly. + /// Task GetImageAsStream(string urn, StoreImageType imageType = StoreImageType.None); + + /// + /// Creates an URI from an image urn (included in the AppImage POCO). + /// + /// The urn (is part of the AppImage). + /// Crops the image accordingly. + /// Uri GetImageUri(string urn, StoreImageType imageType = StoreImageType.None); + + /// + /// Get app description, images, publisher, rating and more for an app in the specified culture. + /// + /// The ID of the app. Can be found in the dev portal or the store URI. + /// The store where the app is published. + /// Culture of the query (returns location specific metadata + ratings). + /// Task GetMetadata(string appId, StoreType store, StoreCultureType storeCulture); + + /// + /// Gets metadata for an app for all available cultures + /// Warning: This method makes a request per culture (100+) which can take a while. + /// + /// The ID of the app. Can be found in the dev portal or the store URI. + /// The store where the app is published. + /// The canellation token. + /// The progress event gets triggered as soon as new data arrives. + /// Task> GetMetadataForAllCultures(string appId, StoreType store, CancellationToken ct, IProgress progress); + + /// + /// Get app rating (count + average) in the specified culture. + /// + /// The ID of the app. Can be found in the dev portal or the store URI. + /// The store where the app is published. + /// Culture of the query (returns location specific ratings). + /// Task GetRating(string appId, StoreType store, StoreCultureType storeCulture); + + /// + /// Gets ratings for an app for all available cultures + /// Warning: This method makes a request per culture (100+) which can take a while. + /// + /// The ID of the app. Can be found in the dev portal or the store URI. + /// The store where the app is published. + /// The canellation token. + /// The progress event gets triggered as soon as new data arrives. + /// Task> GetRatingsForAllCultures(string appId, StoreType store, CancellationToken ct, IProgress progress); + + /// + /// Get a list of reviews (up to 20 per request) for the specified app. + /// + /// The ID of the app. Can be found in the dev portal or the store URI. + /// The store where the app is published. + /// Culture of the query (returns location specific metadata + ratings). + /// Sorting criteria. + /// Task GetReviews(string appId, StoreType store, StoreCultureType storeCulture, StoreReviewSorting sorting, string prevPageMarkerId = null, string nextPageMarkerId = null); + + /// + /// Searches for apps based on a term (app name, keywords, ..) + /// + /// Search termn, is typically an app name or keyword (as used in the store interface). + /// The store where the app is published. + /// Culture of the query (returns location specific metadata + ratings). + /// Task Search(string searchTerm, StoreType store, StoreCultureType storeCulture); } }