BoxCastClient

public class BoxCastClient

The client for the BoxCast API. Use the client to access resources of the BoxCast ecosystem.

Make sure to call BoxCastClient.setUp() before using the sharedClient.

Setup

  • Sets up the shared client. This must be called in order to use sharedClient.

    Declaration

    Swift

    public static func setUp(scope: BoxCastScopable = PublicScope(), configuration: URLSessionConfiguration = .default)

    Parameters

    scope

    The scope for the client. Defaults to the public scope.

Shared Instance

  • The shared singleton object to be used for accessing resources.

    Declaration

    Swift

    public static var sharedClient: BoxCastClient?

Public

  • Returns a boolean indicating if the client is authorized.

    Declaration

    Swift

    public var isAuthorized: Bool { get }

Accessing Broadcasts

  • Returns a list of upcoming broadcasts for a specific channel.

    Declaration

    Swift

    public func getUpcomingBroadcasts(channelId: String, completionHandler: @escaping ((BroadcastList?, Error?) -> Void))

    Parameters

    channelId

    The channel id.

    completionHandler

    The handler to be called upon completion.

  • Returns a list of live broadcasts for a specific channel.

    Declaration

    Swift

    public func getLiveBroadcasts(channelId: String, completionHandler: @escaping ((BroadcastList?, Error?) -> Void))

    Parameters

    channelId

    The channel id.

    completionHandler

    The handler to be called upon completion.

  • Returns a list of archived broadcasts for a specific channel.

    Declaration

    Swift

    public func getArchivedBroadcasts(channelId: String, completionHandler: @escaping ((BroadcastList?, Error?) -> Void))

    Parameters

    channelId

    The channel id.

    completionHandler

    The handler to be called upon completion.

  • Returns a detailed broadcast.

    Declaration

    Swift

    public func getBroadcast(broadcastId: String, channelId: String, completionHandler: @escaping ((Broadcast?, Error?) -> Void))

    Parameters

    broadcastId

    The broadcast id.

    channelId

    The channel id.

    completionHandler

    The handler to be called upon completion.

Accessing Broadcast Views

  • Returns a view for a specific broadcast.

    Declaration

    Swift

    public func getBroadcastView(broadcastId: String, completionHandler: @escaping ((BroadcastView?, Error?) -> Void))

    Parameters

    broadcastId

    The broadcast id.

    completionHandler

    The handler to be called upon completion.