SPTSession

class SPTSession : NSObject, NSSecureCoding
  • Creates a Spotify Web API request using the current session for authorization.

    Declaration

    Swift

    public func makeRequest(method: SKRequest.HTTPMethod, url: URL, parameters: [String: Any] = [:]) -> SKRequest?

    Parameters

    method

    The HTTP verb to use for this request: GET, PUT, POST, or DELETE.

    url

    The destination URL for this request.

    parameters

    The parameters for this request, if any.

    Return Value

    An authorized SKRequest instance, or nil if a request cannot be instantiated with the given parameters.

  • Creates a Spotify Web API request using the current session for authorization.

    Declaration

    Swift

    public func makeRequest(method: SKRequest.HTTPMethod, endpoint: String, parameters: [String: Any] = [:]) -> SKRequest?

    Parameters

    method

    The HTTP verb to use for this request: GET, PUT, POST, or DELETE.

    endpoint

    The destination endpoint for this request.

    parameters

    The parameters for this request, if any.

    Return Value

    An authorized SKRequest instance, or nil if a request cannot be instantiated with the given parameters.