doc: fix: docstring: use Promise

This commit is contained in:
2024-01-25 17:37:08 +01:00
committed by AdrienLSH
parent 22dd4a0299
commit f8490da953
8 changed files with 42 additions and 19 deletions

View File

@ -78,7 +78,7 @@ class Client
/**
* The only right way to determine is the user is logged
* @returns {Boolean}
* @returns {Promise<Boolean>}
*/
async isAuthentificate()
{
@ -91,7 +91,7 @@ class Client
* Send a GET request to %uri%
* @param {String} uri
* @param {*} data
* @returns {Response}
* @returns {Promise<Response>}
*/
async _get(uri, data)
{
@ -106,7 +106,7 @@ class Client
* Send a POST request
* @param {String} uri
* @param {*} data
* @returns {Response}
* @returns {Promise<Response>}
*/
async _post(uri, data)
{
@ -125,7 +125,7 @@ class Client
* Send a DELETE request
* @param {String} uri
* @param {String} data
* @returns {Response}
* @returns {Promise<Response>}
*/
async _delete(uri, data)
{
@ -144,7 +144,7 @@ class Client
* Send a PATCH request with json
* @param {String} uri
* @param {*} data
* @returns {Response}
* @returns {Promise<Response>}
*/
async _patch_json(uri, data)
{
@ -163,7 +163,7 @@ class Client
* Send a PATCH request with file
* @param {String} uri
* @param {*} file
* @returns {Response}
* @returns {Promise<Response>}
*/
async _patch_file(uri, file)
{
@ -179,7 +179,7 @@ class Client
/**
* Change logged state. Use It if you recv an 403 error
* @param {Boolean} state
* @param {Promise<?>} state
* @returns
*/
async _update_logged(state)
@ -211,7 +211,7 @@ class Client
* Loggin the user
* @param {String} username
* @param {String} password
* @returns
* @returns {Promise<Response>}
*/
async login(username, password)
{
@ -224,6 +224,7 @@ class Client
/**
* Logout the user
* @returns {Promise<?>}
*/
async logout()
{
@ -233,7 +234,7 @@ class Client
/**
* Determine if the user is logged. NEVER USE IT, USE isAuthentificated()
* @returns {Boolean}
* @returns {Promise<Boolean>}
*/
async _test_logged()
{