Subscription

final class Subscription

Class providing Subscription related actions.

  • Gets all subscriptions for a given user

    Declaration

    Swift

    public static func getSubscriptions(page: Int = 1,
                                        limit: Int = 10,
                                        success: @escaping (_ subscriptionList: InPlayerSubscriptionList) -> Void,
                                        failure: @escaping (_ error: InPlayerError) -> Void)

    Parameters

    page

    Number of page. Defauls to 1.

    limit

    Number of items per page. Defaults to 10.

    success

    A closure to be executed once the request has finished successfully.

    subscriptionList

    Model containing pagination info and a list of subscriptions.

    failure

    A closure to be executed once the request has finished with error.

    error

    Containing information about the error that occurred.