User – Giavapps Game Jolt API

 

About User Functions

 

For more info about User functions please visit the following link: http://gamejolt.com/api/doc/game/users

 

User Functions

 

gj_user_fetch_user_id(string user_id) You must enter an user_id to fetch the user. To fetch multiple users you can pass multiple user_ids as a comma separated list. This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/users/fetch/

string user_id: the id of the user that you’d like to fetch.

 

gj_user_fetch_username(string username) You must enter a username to fetch the user. This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/users/fetch/

string username: the username of the user that you’d like to fetch. Usernames only contain alphanumeric characters, hyphens and underscores.

 

gj_user_auth(string username, string user_token) Authenticates the user’s information. This should be done before you make any calls for the user, to make sure that the user’s credentials (username/token) are valid. This function stores username and user_token arguments into gj_username and gj_user_token local variables. You can find your personal user_token on http://gamejolt.com by clicking on your avatar icon located on the top-right corner of the screen and then you will have to select Game Token. This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/users/auth/

string username: the username of the user.
string user_token: the user’s token.

 

Code Examples

 

Authenticating User’s Information

 

Create Event

 

gj_init("game_id","private_key");//Initializes Giavapps Game Jolt API
request_user_auth = gj_user_auth("username","user_token");//Authenticates the user

 

Game End Event

 

gj_deinit();//Deinitializes Giavapps Game Jolt API

 

Async – HTTP Event

 

if(gj_http_status() != 0){exit;}//Checks if the status is complete

gj_http_result();//Retrieves result data for gj_result_* functions

if(gj_http_id() == request_user_auth)//Checks if the id is equal to the http request id
{

if(gj_result_success())
{
show_debug_message("THE USER’S CREDENTIALS ARE VALID!");
}
else
{
show_debug_message("THE USER’S CREDENTIALS ARE INVALID!");
}

}

 

I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and promotion.

Comments are closed.