Glider Requester

class GliderRequester(host: String, userId: String?, var deviceId: String?, userToken: String?, debugMode: Boolean = false) : EquinoxRequester

The GliderRequester class is useful to communicate with Glider's backend

Author

N7ghtm4r3 - Tecknobit

Parameters

host

The host address where is running the backend

userId

The user identifier

deviceId

The identifier of the current device

userToken

The user token

debugMode

Whether the requester is still in development and who is developing needs the log of the requester's workflow, if it is enabled all the details of the requests sent and the errors occurred will be printed in the console

See also

EquinoxRequester

Constructors

Link copied to clipboard
constructor(host: String, userId: String?, deviceId: String?, userToken: String?, debugMode: Boolean = false)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun attachInterceptorOnRequest(interceptor: () -> Unit)
Link copied to clipboard
open suspend fun changeEmail(newEmail: String): JsonObject
Link copied to clipboard
open override fun changeHost(host: String)
Link copied to clipboard
open suspend fun changeLanguage(newLanguage: String): JsonObject
Link copied to clipboard
open suspend fun changePassword(newPassword: String): JsonObject
Link copied to clipboard
open suspend fun changeProfilePic(profilePicName: String, profilePicBytes: ByteArray): JsonObject
Link copied to clipboard
open override fun clearSession()

Method used to clear the current session of the requester, for example, after user logged out or changed the auth credentials

Link copied to clipboard
suspend fun copyPassword(password: Password): JsonObject

Request to notify the copy of a password

Link copied to clipboard
open suspend fun deleteAccount(): JsonObject
Link copied to clipboard
suspend fun deletePassword(password: Password): JsonObject

Request to delete a password owned by the user

Link copied to clipboard
suspend fun disconnectDevice(device: ConnectedDevice): JsonObject
suspend fun disconnectDevice(deviceId: String): JsonObject

Request to disconnect a device from the current session

Link copied to clipboard
suspend fun editPassword(passwordId: String, tail: String, scopes: String, password: String? = null): JsonObject

Request to edit an existing password

Link copied to clipboard
suspend fun generatePassword(length: Int, tail: String, scopes: String, includeNumbers: Boolean, includeUppercaseLetters: Boolean, includeSpecialCharacters: Boolean): JsonObject

Request to generate a new password

Link copied to clipboard
suspend fun getConnectedDevices(page: Int, pageSize: Int = DEFAULT_PAGE_SIZE): JsonObject

Request get the connected device of the user

Link copied to clipboard
suspend fun getCustomDynamicAccountData(): JsonObject

Request the dynamic data of the user

Link copied to clipboard
suspend fun getDynamicAccountData(): JsonObject
Link copied to clipboard
suspend fun getKeychain(page: Int, pageSize: Int = DEFAULT_PAGE_SIZE, keywords: String, types: List<PasswordType>): JsonObject

Request to retrieve the keychain owned by the user

Link copied to clipboard
suspend fun getPassword(passwordId: String): JsonObject

Request to retrieve a password owned by the user

Link copied to clipboard
suspend fun insertPassword(tail: String, scopes: String, password: String): JsonObject

Request to insert a new password

Link copied to clipboard
suspend fun refreshPassword(password: Password): JsonObject

Request to refresh a password

Link copied to clipboard

Method used to load the deviceIdHeader map with the current localUser.deviceId

Link copied to clipboard
fun setUserCredentials(userId: String?, userToken: String?)
Link copied to clipboard
open suspend fun signIn(email: String, password: String, language: String, vararg custom: Any?): JsonObject
Link copied to clipboard
suspend fun signUp(serverSecret: String, name: String, surname: String, email: String, password: String, language: String, vararg custom: Any?): JsonObject