content top

Giavapps Game Jolt API

Giavapps Game Jolt API

    Giavapps Game Jolt API (for GMS 1.4 and GMS 2)   Giavapps Game Jolt API extension for GameMaker Studio and GameMaker Studio 2 (developed and produced by Luigi PiscopoHe is the same developer of the Giavapps Windows API, Giavapps MIDI, Giavapps ProAudio, Giavapps CC, Giavapps File, Giavapps 3D, Giavapps Controller and Giavapps Lens Flare extensions for GameMaker: Studio!) provides a full set of functions for easy access to the Game Jolt’s Game API. This Extension supports all the features of the Game Jolt’s Game API v1.0: Users Sessions Trophies Scores Data Store Giavapps Game Jolt API has been tested on the following target platforms: Windows Mac OS X Android   Key Features Supports all the features of the Game Jolt’s Game API v1.0. Includes functions for easy access to HTTP functions. Includes functions for easy access to HTTP result data. Well documented, well structured, easy to use, lightweight and cross-platform.   Documentation   Giavapps Game Jolt API Initialization And Deinitialization (GiavappsGameJoltAPI.gml) User (GiavappsGameJoltAPI.gml) Session (GiavappsGameJoltAPI.gml) Trophy (GiavappsGameJoltAPI.gml) Score (GiavappsGameJoltAPI.gml) Data Store (GiavappsGameJoltAPI.gml) HTTP (GiavappsGameJoltAPI.gml) Result (GiavappsGameJoltAPI.gml)   Licensing EULA   Giavapps Game Jolt API is available on GameMaker: Marketplace!   $14.99 $29.99   LIMITED PROMO! 74% OFF!   BUY IT NOW!   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...

Read More

Trophy – Giavapps Game Jolt API

Trophy – Giavapps Game Jolt API

  About Trophy Functions   For more info about Trophy functions please visit the following link: http://gamejolt.com/api/doc/game/trophies   Trophy Functions   gj_trophy_fetch_achieved() Returns only the achieved trophies for the user. This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/trophies/fetch/   gj_trophy_fetch_missed() Returns only trophies the user hasn’t achieved yet. This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/trophies/fetch/   gj_trophy_fetch_all() Returns all trophies. This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/trophies/fetch/   gj_trophy_fetch_id(string trophy_id) If you would like to return just one trophy, you may pass the trophy_id with this function. If you do so, only that trophy will be returned in the response. You may also pass multiple trophy_ids as a comma separated list here if you want to return a subset of all the trophies. This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/trophies/fetch/ string trophy_id: the id of the trophy that you’d like to fetch.   gj_trophy_add_achieved(string trophy_id) Sets a trophy as achieved for a particular user. This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/trophies/add-achieved/ string trophy_id: the id of the trophy you’d like to add for the user.   Code Examples   Setting A Trophy As Achieved   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 request_trophy_add_achieved = –1;//Request for setting a trophy as achieved   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!"); request_trophy_add_achieved = gj_trophy_add_achieved("trophy_id");//Sets the specified trophy as achieved } else { show_debug_message("THE USER’S CREDENTIALS ARE INVALID!"); } } else if(gj_http_id() == request_trophy_add_achieved)//Checks if the id is equal to the http request id { if(gj_result_success()) { show_debug_message("TROPHY IS ACHIEVED!"); } else { show_debug_message("TROPHY IS NOT ACHIEVED!"); } }   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...

Read More

Session – Giavapps Game Jolt API

Session – Giavapps Game Jolt API

  About Session Functions   For more info about Session functions please visit the following link: http://gamejolt.com/api/doc/game/sessions   Session Functions   gj_session_open() Opens a game session for a particular user. Allows you to tell Game Jolt that a user is playing your game. You must ping the session with gj_session_ping() function to keep it active and you must close it with gj_session_close() function when you’re done with it. Note that you can only have one open session at a time. If you try to open a new session while one is running, the system will close out your current one before opening a new one. Please note that this function also sets the default alarm for session ping (see gj_alarm_id and gj_alarm_time local variables in the Initialization And Deinitialization paragraph). This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/sessions/open   gj_session_ping(double status) Pings an open session to tell the system that it’s still active. If the session hasn’t been pinged within 120 seconds, the system will close the session and you will have to open another one. It’s recommended that you ping every 30 seconds or so to keep the system from cleaning up your session. You can also let the system know whether the player is in an “active” or “idle” state within your game through this call. Please note that this function also resets the default alarm for session ping (see gj_alarm_id and gj_alarm_time local variables in the Initialization And Deinitialization paragraph). This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/sessions/ping/ double status: sets the idle (false) or active (true) status.   gj_session_close() Closes the active session. Please note that this function also stops the default alarm for session ping (see gj_session_alarm and gj_session_time local variables in the Initialization And Deinitialization paragraph).This function returns the id of the HTTP request. For more info: http://gamejolt.com/api/doc/game/sessions/close/   gj_session_alarm(double alarm_id, double alarm_time) You can use this function to customize the id and time of the Alarm used for pinging an open Session. Please note that this function also stores the alarm_id and alarm_time values into gj_alarm_id and gj_alarm_time local variables. double alarm_id: sets the id of the Alarm. double alarm_time: sets the time of the Alarm (in steps).   Code Examples   Running A Session   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 request_session_open = –1;//Request for opening a new session request_session_ping = –1;//Request for pinging an open session   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() ==...

Read More

HTTP – Giavapps Game Jolt API

HTTP – Giavapps Game Jolt API

  About HTTP Functions   HTTP functions are ment for easy-access to the various values stored in the default HTTP ds_map (async_load).   HTTP Functions   gj_http_id() Returns the value for the key "id" stored in the default HTTP ds_map (async_load).   gj_http_status() Returns the value for the key "status" stored n the default HTTP ds_map (async_load).   gj_http_status_code() Returns the value for the key "http_status" stored in the default HTTP ds_map (async_load).   gj_http_data_size() Returns the value for the key "contentLength" stored in the default HTTP ds_map (async_load).   gj_http_data_downloaded() Returns the value for the key "sizeDownloaded" stored in the default HTTP ds_map (async_load).   gj_http_result() Retrieves result data for gj_result_* functions from any http request sent to the Game Jolt API. This function returns the value of the specified key ("return") stored in the default HTTP ds_map (async_load).   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...

Read More

Result – Giavapps Game Jolt API

Result – Giavapps Game Jolt API

  About Result Functions   Result functions are ment for processing result data returned from any HTTP request to the Game Jolt API.   Result Functions   Once you called gj_http_result function you can then process the retrieved result data with the following functions:   gj_result_success() Returns true if the current HTTP request succeed and so the success field is equal to "true" or false otherwise.   gj_result_message() Returns the value (a string) of the message field. The server sends a message field when the current HTTP request fails and so the success field is equal to "false".   gj_result_count() Returns the total number of results for the current HTTP request.   gj_result_field_count() Returns the total number of fields (or parameters) available for the current HTTP request.   gj_result_field_name(double field_id) Returns the name of the given field available for the current HTTP request.. double field_id: zero-based index of the field.   gj_result_field_value(double result_id, string field_name) Returns the value (a string) for the specific result and the given field available for the current HTTP request.. double result_id: zero-based index of the result. string field_name: name of the field.   Code Examples   Processing Multiple Results   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 request_trophy_fetch_all = –1;//Request for fetching all trophies   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!"); request_trophy_fetch_all = gj_trophy_fetch_all();//Fetches all trophies } else { show_debug_message("THE USER’S CREDENTIALS ARE INVALID!"); } } else if(gj_http_id() == request_trophy_fetch_all)//Checks if the id is equal to the http request id { if(gj_result_success()) { show_debug_message("TROPHIES HAVE BEEN FETCHED!"); for(var r=0; r<gj_result_count(); r++)//Processes all results { show_debug_message("RESULT ID "+string(r)+":"); for(var f=0; f<gj_result_field_count(); f++)//Processes all fields { show_debug_message(gj_result_field_name(f)+"="+gj_result_field_value(r, gj_result_field_name(f))); } } } else { show_debug_message("TROPHIES HAVE NOT BEEN FETCHED!"); } }   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...

Read More
content top