Refy Requester

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

The RefyRequester class is useful to communicate with Refy's backend

Author

N7ghtm4r3 - Tecknobit

Parameters

host

The host address where is running the 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

Constructors

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

Functions

Link copied to clipboard
fun attachInterceptorOnRequest(interceptor: () -> Unit)
Link copied to clipboard
suspend fun attachLinksWithCollection(collection: LinksCollection, links: List<String>): JsonObject

Method to attach links with the collection

Link copied to clipboard
suspend fun changeCloseApplicationOnOpenLink(closeApplicationOnOpenLink: Boolean): JsonObject

Request to change the close application on open link preference

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
suspend fun changeMemberRole(teamId: String, member: TeamMember, role: TeamRole): JsonObject

Method to change the role of a member

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 changeTagName(tagName: String): JsonObject

Method to request the to change the tag name of the user

Link copied to clipboard
open fun clearSession()
Link copied to clipboard
suspend fun createCollection(color: String, title: String, description: String, links: List<String>): JsonObject

Method to create a collection

Link copied to clipboard
suspend fun createCustomLink(title: String, description: String, resources: Map<String, String>, fields: Map<String, String>, hasUniqueAccess: Boolean = false, expiredTime: ExpiredTime = ExpiredTime.NO_EXPIRATION): JsonObject

Method to create a custom link

Link copied to clipboard
suspend fun createLink(referenceLink: String, description: String): JsonObject

Method to create a new link

Link copied to clipboard
suspend fun createTeam(title: String, logoPicName: String, logoPicBytes: ByteArray, description: String, membersRaw: List<TeamMember>): JsonObject

Method to request to create a team

Link copied to clipboard
open suspend fun deleteAccount(): JsonObject
Link copied to clipboard
suspend fun deleteCollection(collection: LinksCollection): JsonObject

Method to delete a collection

Link copied to clipboard
suspend fun deleteCustomLink(link: CustomRefyLink): JsonObject

Method to delete a custom link

Link copied to clipboard
suspend fun deleteLink(link: RefyLink): JsonObject

Method to delete a link

Link copied to clipboard
suspend fun deleteTeam(team: Team): JsonObject

Method to delete a team

Link copied to clipboard
suspend fun editCollection(collectionId: String, color: String, title: String, description: String, links: List<String>): JsonObject

Method to edit a collection

Link copied to clipboard
suspend fun editCustomLink(linkId: String, title: String, description: String, resources: Map<String, String>, fields: Map<String, String>, hasUniqueAccess: Boolean = false, expiredTime: ExpiredTime = ExpiredTime.NO_EXPIRATION): JsonObject

Method to edit a custom link

Link copied to clipboard
suspend fun editLink(linkId: String, referenceLink: String, description: String): JsonObject

Method to edit a link

Link copied to clipboard
suspend fun editTeam(teamId: String, title: String, logoPicName: String, logoPicBytes: ByteArray, description: String, membersRaw: List<TeamMember>): JsonObject

Method to request to update a team

Link copied to clipboard
suspend fun getCollection(collectionId: String): JsonObject

Method to request a collection

Link copied to clipboard
suspend fun getCollectionLinks(collectionId: String, page: Int = DEFAULT_PAGE, pageSize: Int = DEFAULT_PAGE_SIZE, keywords: String = ""): JsonObject

Method request the links shared in the collection

Link copied to clipboard
suspend fun getCollections(ownedOnly: Boolean = false, page: Int = DEFAULT_PAGE, pageSize: Int = DEFAULT_PAGE_SIZE, keywords: String = ""): JsonObject

Method the collections of the user

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

Method request the teams where the collection is shared

Link copied to clipboard
suspend fun getCustomLink(linkId: String): JsonObject

Method to request a custom link

Link copied to clipboard
suspend fun getCustomLinks(page: Int = DEFAULT_PAGE, pageSize: Int = DEFAULT_PAGE_SIZE, keywords: String = ""): JsonObject

Method the custom links of the user

Link copied to clipboard
suspend fun getDynamicAccountData(): JsonObject
Link copied to clipboard
suspend fun getLink(linkId: String): JsonObject

Method to request a custom link

Link copied to clipboard
suspend fun getLinks(ownedOnly: Boolean = false, page: Int = DEFAULT_PAGE, pageSize: Int = DEFAULT_PAGE_SIZE, keywords: String = ""): JsonObject

Method the links of the user

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

Method the potential members to add in a team

Link copied to clipboard
suspend fun getTeam(teamId: String): JsonObject

Method to request a team

Link copied to clipboard
suspend fun getTeamCollections(teamId: String, page: Int = DEFAULT_PAGE, pageSize: Int = DEFAULT_PAGE_SIZE, keywords: String = ""): JsonObject

Method to request the collections shared with the team

Link copied to clipboard
suspend fun getTeamLinks(teamId: String, page: Int = DEFAULT_PAGE, pageSize: Int = DEFAULT_PAGE_SIZE, keywords: String = ""): JsonObject

Method to request the links shared with the team

Link copied to clipboard
suspend fun getTeams(ownedOnly: Boolean = false, page: Int = DEFAULT_PAGE, pageSize: Int = DEFAULT_PAGE_SIZE, keywords: String = ""): JsonObject

Method the teams where the user is a member

Link copied to clipboard
suspend fun leave(teamId: String): JsonObject

Method to leave from a team

Link copied to clipboard
suspend fun removeCollectionFromTeam(teamId: String, collection: LinksCollection): JsonObject

Method to remove from a team a collection

Link copied to clipboard
suspend fun removeLinkFromCollection(collectionId: String, link: RefyLink.RefyLinkImpl): JsonObject

Method to remove from a collection a link

Link copied to clipboard
suspend fun removeLinkFromTeam(teamId: String, link: RefyLink.RefyLinkImpl): JsonObject

Method to remove from a team a link

Link copied to clipboard
suspend fun removeMember(teamId: String, member: TeamMember): JsonObject

Method to remove a member from the team

Link copied to clipboard
suspend fun removeTeamFromCollection(collectionId: String, team: Team): JsonObject

Method to remove from a collection a team

Link copied to clipboard
fun setUserCredentials(userId: String?, userToken: String?)
Link copied to clipboard
suspend fun shareCollectionsWithTeam(team: Team, collections: List<String>): JsonObject

Method share collections with team

Link copied to clipboard
suspend fun shareCollectionWithTeams(collection: LinksCollection, teams: List<String>): JsonObject

Method to manage the teams where the collection is shared

Link copied to clipboard
suspend fun shareLinksWithTeam(team: Team, links: List<String>): JsonObject

Method share links with team

Link copied to clipboard
suspend fun shareLinkWithCollections(link: RefyLink.RefyLinkImpl, collections: List<String>): JsonObject

Method to manage the collections where the link is shared

Link copied to clipboard
suspend fun shareLinkWithTeams(link: RefyLink.RefyLinkImpl, teams: List<String>): JsonObject

Method to manage the teams where the link is shared

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