itSeez3DAvatarSDK

public class itSeez3DAvatarSDK : NSObject

itSeez3DAvatarSDK is used to initialize SDK and authorize user.

Initialize

  • Should be called first to initialize and handle the configuration of itSeez3DAvatarSDK. After this call you can use the SDK for other purposes.

    Declaration

    Swift

    public class func with(consumerKey: String, consumerSecret: String, modelFolderName: String = "models")

    Parameters

    consumerKey

    Consumer key provided in the developer section in Web API.

    consumerSecret

    Consumer secret provided in the developer section in Web API.

    modelFolderName

    Path to folder in Documents (standard iOS folder) which will be used to store the models and temporary files.

Authorize

  • Is used to authorize user. Will be automatically called again in the case of 401 (Unauthorized) http error.

    Declaration

    Swift

    public class func authorize(completion: @escaping CompletionHandler<Bool>)

    Parameters

    completion

    Closure to be executed once the request has finished.

  • Is used to determine the authorization status.

    Declaration

    Swift

    public class func isAuthorized() -> Bool

User

  • Is used to create a new user on server. Should be called after SDK authorization. All avatars will be created for this user.

    Declaration

    Swift

    public class func createNewUser(completion: @escaping CompletionHandler2<ResponseUserModel, AFError>)

    Parameters

    completion

    Closure to be executed once the request has finished.

  • Is used to change the user avatars are requested for.

    Declaration

    Swift

    public class func setUser(user: ResponseUserModel)

    Parameters

    user

    Information about user received from server.

  • Is used to get current user.

    Declaration

    Swift

    public class func getCurrentUser() -> ResponseUserModel?

    Return Value

    current user model.