@bitzonegaming/roleplay-engine-sdk
Version:
Roleplay Engine SDK
36 lines (35 loc) • 1.53 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PlayerApi = void 0;
class PlayerApi {
constructor(client) {
this.client = client;
}
/**
* This endpoint changes the password of the currently authenticated account.<br/>This endpoint performs account-level operations. The token must be associated with an account.<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [Access Token]<br/>🔓 [Session Token]
* @summary Change my password
* @param {ChangeMyPasswordRequest} request
* @param {*} [options] Override http request option.
* @throws {EngineError}
*/
changeMyPassword(request, options) {
return this.client.put({
url: 'player/accounts/password',
data: request,
options,
});
}
/**
* This endpoint retrieves the currently selected character for the authenticated account.<br/>This endpoint performs character-level operations. The token must be associated with a character.<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [Access Token]<br/>🔓 [Session Token]
* @summary Get my current character
* @param {*} [options] Override http request option.
* @throws {EngineError}
*/
getMyCurrentCharacter(options) {
return this.client.get({
url: 'player/characters/current',
options,
});
}
}
exports.PlayerApi = PlayerApi;