-
Notifications
You must be signed in to change notification settings - Fork 0
User API
Enzo Z edited this page Oct 26, 2024
·
5 revisions
Each method corresponds to a user detail or action you can perform.
const { HMSClient } = require('hostmyservers.js');
const client = new HMSClient(apiKey);
client.user.getLastName()
.then(data => console.log(data))
.catch(error => console.error('Error fetching user details:', error));
-
getDetails
=> Returns information of the user -
getId
=> Return the ID of the user -
getName
=> Return the first name of the user -
getLastName
=> Return the last name of the user -
getRole
=> Return the role of the user -
getEmail
=> Return the email address of the user -
getEmailVerifiedAt
=> Return the email address verification date of the user -
get2FAConfirmedAt
=> Return the 2FA confirmation date of the user -
getPhoneNumber
=> Return the phone number of the user -
getAddress
=> Return the address of the user -
getRegion
=> Return the region of the user -
getCity
=> Return the city of the user -
getPostalCode
=> Return the postal code of the user -
getCountry
=> Return the country of the user -
getBusiness
=> Return the business of the user -
getBusinessType
=> Return the business type of the user -
getBusinessSiret
=> Return the business siret of the user -
getBusinessTva
=> Return the business TVA of the user -
getLanguage
=> Return the language of the user -
isStudent
=> Return if the user is a student -
getTokens
=> Return the token(s) of the user -
getCustStripe
=> Return the cust Stripe of the user -
getCustGocardless
=> Return the cust Gocardless of the user -
getGithubToken
=> Return the Github token of the user -
getGoogleToken
=> Return the Google token of the user -
isBounced
=> Return if the user is bounced -
getSmtp
=> Return the SMTP of the user -
isNotifNewsLetter
=> Return if the user accepted to receive news letter -
isNotifNew
=> Return if the user accepted to receive new -
isNotifWork
=> Return if the user receive the news letter -
isNotifConnexion
=> ? -
getCreatedAt
=> Return the creation date of the user -
getUpdatedAt
=> Return the last update of the user -
getDeletedAt
=> Return the deletion date of the user
-
revokeToken
=> Revoke your actual token
Created by FlanZCode, this project is under MIT license.