Client

mobile/Client~ Client

Represents the SoloLearn client

Constructor

new Client(data)

Source:
Parameters:
Name Type Description
data Object

Members

(nullable) user :ClientUser

Source:
On successful login, becomes the logged in user's ClientUser object
Type:

Methods

login(email, password, hashedopt) → {ClientUser}

Source:
See:
Log in to a SoloLearn account
Parameters:
Name Type Attributes Default Description
email string The account's email
password string The account's password
hashed boolean <optional>
false Whether or not the password already has been hashed using HMAC SHA-1 with "password" as the key. You may want to do this if others have access to your source code.
Returns:
Type
ClientUser

request(options, bodyopt)

Source:
Send an HTTP request
Parameters:
Name Type Attributes Default Description
options Object HTTP options
body Object <optional>
null The request body

(async) requestV1(path, body) → {Promise.<Object>}

Source:
Send a request to SoloLearn's v1 API
Parameters:
Name Type Description
path string The request path
body Object The request body
Returns:
JSON decoded response
Type
Promise.<Object>

(async) requestV2(method, path) → {Promise.<Object>}

Source:
Send a request to SoloLearn's v2 API
Parameters:
Name Type Description
method string The request method
path string The request path
Returns:
JSON decoded response
Type
Promise.<Object>