Ametista Requester

class AmetistaRequester(host: String, userId: String?, userToken: String?, debugMode: Boolean = false) : EquinoxRequester

The AmetistaRequester class is useful to communicate with the Ametista's backend

Author

N7ghtm4r3 - Tecknobit

Parameters

host

The host where is running the Nova's backend

userId

The user identifier

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?, userToken: String?, debugMode: Boolean = false)

Functions

Link copied to clipboard
suspend fun addApplication(iconBytes: ByteArray?, iconName: String?, name: String, description: String): JsonObject

Method to add a new application to the system

Link copied to clipboard
suspend fun addViewer(name: String, surname: String, email: String): JsonObject

Method to add a new com.tecknobit.ametistacore.models.AmetistaUser.Role.VIEWER in the system

Link copied to clipboard
suspend fun adminSignIn(adminCode: String, email: String, password: String): JsonObject

Method to sign-in as an ADMIN

Link copied to clipboard
suspend fun adminSignUp(adminCode: String, name: String, surname: String, email: String, password: String, language: String): JsonObject

Method to sign-up as an ADMIN

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
suspend fun changeViewerPresetPassword(password: String): JsonObject

Method to change the preset password by a com.tecknobit.ametistacore.enums.Role.VIEWER

Link copied to clipboard
open suspend fun deleteAccount(): JsonObject
Link copied to clipboard
suspend fun deleteApplication(application: AmetistaApplication): JsonObject

Method to delete an AmetistaApplication

Link copied to clipboard
suspend fun editApplication(applicationId: String, iconBytes: ByteArray?, iconName: String?, name: String, description: String): JsonObject

Method to edit an existing application

Link copied to clipboard
suspend fun getApplication(applicationId: String): JsonObject

Method to get an existing application

Link copied to clipboard
suspend fun getApplications(    page: Int = DEFAULT_PAGE,     pageSize: Int = DEFAULT_PAGE_SIZE,     name: String = "",     platforms: List<Platform> = emptyList()): JsonObject

Method to get the applications list

Link copied to clipboard
suspend fun getDynamicAccountData(): JsonObject
Link copied to clipboard
suspend fun getIssues(    applicationId: String,     platform: Platform,     page: Int = DEFAULT_PAGE,     pageSize: Int = DEFAULT_PAGE_SIZE,     filters: String): JsonObject

Method to get the issues list

Link copied to clipboard
suspend fun getPerformanceData(applicationId: String, platform: Platform, performanceDataFilters: PerformanceDataFilters): JsonObject

Method to get the performance data of an AmetistaApplication

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

Method to get the members registered in the current session

Link copied to clipboard
suspend fun getVersionSamples(applicationId: String, platform: Platform, analyticType: PerformanceAnalyticType): JsonObject

Method to get the version samples for each analytic

Link copied to clipboard
suspend fun removeMember(member: AmetistaMember): JsonObject

Method to remove an com.tecknobit.ametistacore.models.AmetistaMember from the system

Link copied to clipboard
fun setUserCredentials(userId: String?, userToken: String?)
Link copied to clipboard
open suspend fun signIn(email: String, password: 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
Link copied to clipboard
suspend fun viewerSignIn(serverSecret: String, email: String, password: String): JsonObject

Method to sign-in as an ADMIN