We're archiving the forums and going read only! You'll be able to see old threads, but new topics and replies have been disabled.

Visit the Game Jolt community for new questions and conversations.


Hello! Today I present to this community the Python module made to communicate with the Achievment System of Game Jolt.

It's out! **Current version: 1.1**

Grab it at: https://github.com/vncastanheira/gjapi_python

You can also download the repository as a zip file.

It's an interface-free module, making use of the python's built-in functionalities and the standart library. That means that anyone with the a python bundle can work with the module. A single class, with each attribute and method perfoming a type of call to the online system of Game Jolt.

#emotions_dlg.tongue}" title="{#emotions_dlg.tongue}" />

Edit: the release version now contains support for the 2.7 version of Python, but is marked as unstable because I didn't tested it properly yet.

The module is documented and is also in the repository. You can open it with any browser, so just go to Documentation > index.html to navigate troughtout it.

Check out the README.md if you find any bugs, want some help or just want to suggest something for the API. This topic is also available if any suppport/help is needed.

I hope you enjoy it and please leave feedbacks! I wish to know how people are handling it.


Page 1 of 31 replies.

over 12 years ago

This is awesome, man. I'll keep an eye on this thread to know when it's stable/done so I can update the landing page with Python as being a supported language!

Last modified on December 31, 2012 by 🌩️ @CROS

over 12 years ago

Hello and I'm back with news.

I tried some few things and finally choosed to use json to retrieve the information, but the true return value of the functions are python dictionaries. The latter are up to the developer to handle, like the structure of the informations received and errors messages because of bad parameters.

I'm also having some doubts about the Data Store. It seems that I don't how to handle the parameter named key. Because the module needs some testing to grant that it's working properly, I wish some insight on how this particular feature works. The API Doc only gives information how to retrieve it, but not what is it.

Thanks in advance! The module is close to be finished and the first version, released!

Last modified on January 10, 2013 by Epiplon @epiplon

over 12 years ago

The Data Storage returns whatever you put into it. For Data Storage you will probably want to use Dump as that will just return out whatever text you put in. That's how I handled it in my C# API.

The Data Store can hold any form of text to a certain size limit (not sure how big), so if you want to save a config file or something else you can just shove it at the Data Store and then get it back when you need it.

The key is the name of the "file" you want to save it as. For example if you wanted to store a config file you would pass it as a key of "config" or something similar. Effectively this means that the Data Store is little more than a dictionary.

Does that help?

over 12 years ago

Of course! So I digged the C# source code but couldn't find anything related to Data Store, so I want a hand on that.

My problem actually is about user interface. Each communication in the API is made by a single method from the GameJoltTrophy class. That's why I return a dictionary object, because I'm letting the user handle the information in a easy and compatible way for every python program.

Gonna bring feedback after trying some stuff! Thanks!

over 12 years ago

It's finally out! The main post was edited and everything works just fine now!

over 12 years ago

I'm putting it up on the achievements landing page now.

almost 11 years ago

Perhaps you should put it on the PyPi too, for those of us who don't like installing modules by hand?

almost 11 years ago

The code is open and you can do whatever you want with it.
It's been too longe since I messed up with it.

over 10 years ago

im makeing a achevment of chaos

over 10 years ago

So, how do I use this?

over 9 years ago

can someone tell me what im supposed to do with it? i think im supposed to edit "py_gjiapi.py" to fit my code,

over 9 years ago

Is it possible to use it in RenPy?

Also: what is the license?

Last modified on February 11, 2016 by Cyber Killer @Cyber_Killer

over 9 years ago
In response to %{ user }@blaze_the_star

No, you will just import the module and create an instance of 'GameJoltTrophy'.

over 9 years ago
In response to %{ user }@Cyber_Killer

Never tested it. If something goes wrong or if you succeed in doing so, you provide a feedback.

over 9 years ago

ugh, this looks so confusing... how do i do a basic login?

over 9 years ago
In response to %{ user }@epiplon

OK, but what is the license? My game is under GNU GPLv3, I need something compatible.

over 9 years ago
In response to %{ user }@Cyber_Killer

It definitely can work with Ren'Py. But not in a plug'n play fashion like "you put the .py, you put the values and it magically works". I'm gonna try, see if i can make a working sample.

over 9 years ago

okay, i know how this works now but... how would i use the valid user function?

over 9 years ago

Still no info on the license. Look, a license for the code is important stuff for many people, especially in the FLOSS communities (like me). If you don't care then just write that it's public domain or CC0, or BSD license or WTFPL, and just attach a file with this license to the code repository and nobody will ask about this again.

(other good, permissive licenses for libs are: LGPL, MIT, zlib)

edit: I apologize, I never thought to look into the code file, but kept looking all around in readmes, etc. This code is under LGPL, it's sad in the code file in the header.

Last modified on February 22, 2016 by Cyber Killer @Cyber_Killer

over 9 years ago

Hiw do I use authenticate user?

almost 9 years ago

Does this work for Ren-Py, and if so, could someone link me a tutorial on implementing it into a Ren-Py game?

almost 8 years ago

Valeu Thanks! :)

over 6 years ago

It seems that you can not save scores, for a table other than Main, although they already believe you to allow guests, do not record them, even if you indicate the name!

I have already solved the problem, replace the name with the ID number of the table.-
Sorry

Last modified on January 29, 2019 by esbva @esbva

over 5 years ago

could you make some tutorials on it?

about 5 years ago

How do I use this???

about 5 years ago
In response to %{ user }@ScottyRus

This module is kinda outdated and doesn't have the stuff from API 1.2, but here's a little tutorial:

Import the module:

from py_gjapi import GameJoltTrophy

Connect to GameJolt:

gamejolt = GameJoltTrophy(gj_username,gj_token,game_id,private_key)

(Optional) Check successful login:

gamejolt.authenticateUser()

Open a session:

gamejolt.openSession()

Then do whatever you want

almost 5 years ago

You can make the friend system?

over 3 years ago

funny

over 3 years ago

does this api still work? last time I used it it errored out, I was wondering cause I really wanted to put gamejolt api into my pygame game.

over 3 years ago
In response to %{ user }@E____

tested it last time around 2 months ago and it worked perfectly fine