Service

  • Service for performing requests. A valid JWT is required to perform requests.

    It is possible to just perform a single request, or to perform requests until all items has been fetched, if the response type supports paging.

    If the JWT has expired, it will be renewed before the request is performed.

    See more

    Declaration

    Swift

    public class BagbutikService
  • JWT

    A JSON Web Token (JWT) to be used to authorize API requests.

    The JWT is valid for 20 minutes, but will be renewed automatically when performing requests with BagbutikService.

    Full documentation for how JWT is used with the API: https://developer.apple.com/documentation/appstoreconnectapi/generating_tokens_for_api_requests

    See more

    Declaration

    Swift

    public struct JWT
  • FetchData Asynchronous

    Function used to fetch data for requests.

    Only used to inject into a BagbutikService.

    Declaration

    Swift

    public typealias FetchData = (_ request: URLRequest, _ delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)

    Parameters

    request

    The URLRequest for which to load data.

    delegate

    Task-specific delegate.

    Return Value

    Data and response.

  • Errors from the API or from the decoding of the responses.

    See more

    Declaration

    Swift

    public enum ServiceError : Error