Breadcrumbs

StaticsApi. iOS

Api for getting base information from your server and send to server possible tokens.

Check url

Check if given api url is correct.

checkUrl(api: String, completion: ((VMSApiError?)))

Get all translations

Get translations of given language and from specific revision.

If request was successful you'll get VMSTranslationObject object. If any error would occur you would get an VMSApiError object.

getTranslations(info: VMSTranslationsRequest, completion: (VMSTranslationObject?, VMSApiError?))

VMSTranslationsRequest

Object with needed information to get translations.

init(language: VMSLanguage, revision: Int)

language - can be russian or english

revision - number of revision from which you'll get changes in translations. Set to 0 to get all translations

Static

Get base information that you need for player

If request was successful you'll get VMSStatic object. If any error would occur you would get an VMSApiError object.

getStatic(completion: (VMSStatic?, VMSApiError?))

VMSStatic

Object you get from server with information you need to run some functionality.

cameraIssues - issues on which you can send report to server

videoRates - video rates that are available for player

markTypes - mark types available to user

eventTypes - event types available to user

analyticEventTypes analytic event types available to user

analyticCaseTypes - analytic cases types available to user

Basic static

Get information you need to proceed with login.

If request was successful you'll get VMSBasicStatic object. If any error would occur you would get an VMSApiError object.

getBasicStatic(completion: (VMSBasicStatic?, VMSApiError?))

VMSBasicStatic

Object you get from server with information you need to login properly.

isCaptchaAvailable - true if you need captcha information for login

isExternalAuthEnabled - true if you can login with external service

version - current version of backend

Tokens

FCM

Send FCM token to server if you have firebase

sendFcmToken(token: String, completion: ((VMSApiError?)))

APNS

Send APNS token to server if you use it

sendApnToken(token: String, completion: ((VMSApiError?)))

VOIP

Send VOIP token for calls if you use it

sendVoipToken(token: String, completion: ((VMSApiError?)))