BoostlingoSDK
public final class BoostlingoSDK : NSObject
Boostlingo is the entry point to the Boostlingo SDK. Used for accessing the Boostlingo API as well as initiating Calls.
-
A BLCallDelegate to receive Calls callbacks.
Declaration
Swift
public weak var delegate: BLCallDelegate? -
A BLChatDelegate to receive chat related callbacks.
Declaration
Swift
public weak var chatDelegate: BLChatDelegate? -
Current BLCall.
Declaration
Swift
public internal(set) var currentCall: BLCall? { get }
-
Obtains an instance of the Boostlingo SDK.
Declaration
Swift
public init( authToken: String, region: String, logger: BLLogger = BLNullLogger() )Parameters
authTokenBoostlingo auth token retrieved from the server.
regionBoostlingo region from getRegions() list.
loggerlogger implementation, BLNullLogger implementation is used by default .
-
Gets Boostlingo region list.
Declaration
Swift
public static func getRegions() -> [String] -
Gets Boostlingo library version.
Declaration
Swift
public static func getVersion() -> String -
Loads and caches all the data needed for the SDK work from the Boostlingo API. Will be called inside makeVideoCall or makeVoiceCall, if it is not called separately before.
Declaration
Swift
public func initialize(completion: @escaping (Error?) -> Void)Parameters
completionCompletion callback.
-
Retrieves the call dictionaries from the Boostlingo API. Should be used for setting up language and service type lists, caches the results so API is not hit every time.
Declaration
Swift
public func getCallDictionaries(completion: @escaping (CallDictionaries?, Error?) -> Void)Parameters
completionCompletion callback.
-
Retrieves the profile data from the Boostlingo API, caches the results so API is not hit every time.
Declaration
Swift
public func getProfile(completion: @escaping (Profile?, Error?) -> Void)Parameters
completionCompletion callback.
-
Retrieves an ordered list of languages enabled in the voice (OPI) policy. Helper for filtering and sorting the full list of languages. Uses the cached call dictionary.
Declaration
Swift
public func getVoiceLanguages(completion: @escaping ([Language]?, Error?) -> Void)Parameters
completionCompletion callback.
-
Retrieves an ordered list of languages enabled in the video (VRI) policy. Helper for filtering and sorting the full list of languages. Uses the cached call dictionary.
Declaration
Swift
public func getVideoLanguages(completion: @escaping ([Language]?, Error?) -> Void)Parameters
completionCompletion callback.
-
Retrieves the call details from the Boostlingo API.
Declaration
Swift
public func getCallDetails(callId: Int, completion: @escaping (CallDetails?, Error?) -> Void)Parameters
callIdCall id.
completionCompletion callback.
-
Retrieves the pre-call custom form data..
Declaration
Swift
public func getPreCallCustomForm( completion: @escaping (CustomForm?, Error?) -> Void )Parameters
completionCompletion callback.
-
Used to make/place a Video Call in Boostlingo.
Declaration
Swift
public func makeVideoCall( callRequest: CallRequest, localVideoView: VideoView?, delegate: BLCallDelegate, completion: @escaping (BLVideoCall?, Error?) -> Void )Parameters
callRequestCall request model.
remoteVideoViewRemote Video container.
localVideoViewLocal Video container.
completionCompletion callback.
-
Used to make/place a Call in Boostlingo.
Declaration
Swift
public func makeVoiceCall( callRequest: CallRequest, delegate: BLCallDelegate, completion: @escaping (BLVoiceCall?, Error?) -> Void )Parameters
callRequestCall request model.
completionCompletion callback.
-
Used to hang up the current call in Boostlingo.
Declaration
Swift
public func hangUp(completion: @escaping (Error?) -> Void)Parameters
completionCompletion callback.
-
Toggles audio route for the current call.
Declaration
Swift
public func toggleAudioRoute(toSpeaker: Bool)Parameters
toSpeakerOverrides audio session output to speaker, if true.
-
Validates the call request is appropriate to start a call. Can be called directly, but it is always called when making video/voice calls.
Declaration
Swift
public func validateCallReq(callReq: CallRequest, completion: @escaping (Error?) -> Void)Parameters
callReqCall request model.
completionCompletion callback.
-
Sends the text specified as a chat message to interpreter.
Declaration
Swift
public func sendChatMessage(text: String, completion: @escaping (ChatMessage?, Error?) -> Void)