doc: fix: docstring: use Promise

This commit is contained in:
2024-01-25 17:37:08 +01:00
parent 8eeb9ed4ab
commit c23500e0a0
8 changed files with 42 additions and 19 deletions

View File

@ -77,7 +77,7 @@ class Client
/**
* The only right way to determine is the user is logged
* @returns {Boolean}
* @returns {Promise<Boolean>}
*/
async isAuthentificate()
{
@ -90,7 +90,7 @@ class Client
* Send a GET request to %uri%
* @param {String} uri
* @param {*} data
* @returns {Response}
* @returns {Promise<Response>}
*/
async _get(uri, data)
{
@ -105,7 +105,7 @@ class Client
* Send a POST request
* @param {String} uri
* @param {*} data
* @returns {Response}
* @returns {Promise<Response>}
*/
async _post(uri, data)
{
@ -124,7 +124,7 @@ class Client
* Send a DELETE request
* @param {String} uri
* @param {String} data
* @returns {Response}
* @returns {Promise<Response>}
*/
async _delete(uri, data)
{
@ -143,7 +143,7 @@ class Client
* Send a PATCH request with json
* @param {String} uri
* @param {*} data
* @returns {Response}
* @returns {Promise<Response>}
*/
async _patch_json(uri, data)
{
@ -162,7 +162,7 @@ class Client
* Send a PATCH request with file
* @param {String} uri
* @param {*} file
* @returns {Response}
* @returns {Promise<Response>}
*/
async _patch_file(uri, file)
{
@ -178,7 +178,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)
@ -210,7 +210,7 @@ class Client
* Loggin the user
* @param {String} username
* @param {String} password
* @returns
* @returns {Promise<Response>}
*/
async login(username, password)
{
@ -223,6 +223,7 @@ class Client
/**
* Logout the user
* @returns {Promise<?>}
*/
async logout()
{
@ -232,7 +233,7 @@ class Client
/**
* Determine if the user is logged. NEVER USE IT, USE isAuthentificated()
* @returns {Boolean}
* @returns {Promise<Boolean>}
*/
async _test_logged()
{