Skip to content

Site endpoint

Daniel López Guimaraes edited this page Aug 4, 2023 · 8 revisions
This endpoint does not require authentication

Methods

POST site/check_email

This method checks if the provided email address is registered on the server. If the email is not registered, the server returns a captcha for registration.

Parameters

Field Notes
e The email address to check.

Response

Type Field Notes
bool registered If the email address is registered on the server.
string capId Optional. Captcha ID to validate.
int capLen Optional. Number of characters the captcha has.
string capImg Optional. base64-encoded PNG captcha to validate. The 11th character has to be removed for decoding to work.
bool sentNewPassword Optional. If the account exists and doesn't have a password, this field is set to true and a password is sent to the email address of the account.

POST site/reset_password

This method sends a new password to the email address of the provided account.

Parameters

Field Notes
e Email address of the account.

Response

Type Field Notes
bool aws Unknown purpose.
bool success If the new password has been sent to the email address.

GET site/top_likes

This method returns a ranking of the 20 most liked accounts on the server.

Parameters

This method has no parameters.

Response

Type Field Notes
array<UserInfo> items Ranking of the most liked accounts.
bool ok If the request has been successful.

POST site/register

This method creates a new account with the provided email address if the captcha is valid. If the request is successful, the response sets a session cookie unn_session for handling the session.

Parameters

Field Notes
e Email address of the account.
cI Captcha ID from site/check_email.
cA Captcha answer.

Response

Type Field Notes
bool success If the registration has been successful.
string nickname Account nickname. This entry is unused.
int i Account ID.
string n Acount nickname.

GET site/top_scores

This method returns a ranking of the 20 users with the highest score on the selected game during a period of time.

Parameters

Field Notes
g Game ID.
d Period of time. Can be today, week, month or alltime.

Response

Type Field Notes
array<UserScoreInfo> items Ranking of the accounts with the highest score.
bool ok If the request has been successful.

POST site/login

This method tries to login the client with the provided email address and password. If the request is successful, the response sets a session cookie unn_session for handling the session.

Parameters

Field Notes
e The email address of the account.
p The MD5 hash of the password.

Response

Type Field Notes
int i Account ID.
string n Account nickname.
string t Unknown purpose. Looks like a remnant of minI.
bool hP If the account has a password.
string nF Number of favorites of the account.
string nL Number of likers of the account.
string state Object of the current save state of the account as a string.
int version Version the last save was made.
int revision Revision the last save was made.
bool success If the login has been successful.
array<Notification> unclaimedNotifications Optional. Unclaimed awards.

Objects

UserScoreInfo

This object holds information about the user's relationship with the client's account and the score it has.

Type Field Notes
string i Numeric ID of the user.
string n User nickname.
string minI Object holding the Pou data of the user as a string.
string l Unknown purpose.
string nL Number of likes the user has.
string s Numeric score.
int iL Optional (requires authentication). Bool telling if the client's account likes the user as an integer.
int lM Optional (requires authentication). Bool telling if the user likes the client's account as an integer.