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.
-
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
scopeThe scope for the client. Defaults to the public scope.
-
The shared singleton object to be used for accessing resources.
Declaration
Swift
public static var sharedClient: BoxCastClient?
-
Returns a boolean indicating if the client is authorized.
Declaration
Swift
public var isAuthorized: Bool { get }
-
Returns a list of upcoming broadcasts for a specific channel.
Declaration
Swift
public func getUpcomingBroadcasts(channelId: String, completionHandler: @escaping ((BroadcastList?, Error?) -> Void))Parameters
channelIdThe channel id.
completionHandlerThe 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
channelIdThe channel id.
completionHandlerThe 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
channelIdThe channel id.
completionHandlerThe 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
broadcastIdThe broadcast id.
channelIdThe channel id.
completionHandlerThe handler to be called upon completion.
-
Returns a view for a specific broadcast.
Declaration
Swift
public func getBroadcastView(broadcastId: String, completionHandler: @escaping ((BroadcastView?, Error?) -> Void))Parameters
broadcastIdThe broadcast id.
completionHandlerThe handler to be called upon completion.
View on GitHub
BoxCastClient Class Reference