API/Site Updates - Key reissue

Announcements regarding our community.
Post Reply
User avatar
Zer0xFF
Posts: 284
Joined: Fri Apr 20, 2018 9:18 am

API/Site Updates - Key reissue

Post by Zer0xFF » Sun Jul 22, 2018 10:56 pm

Hi everyone,

Quick Update in regards to API, keys have been issued to new requests (no change is needed for those who got their keys earlier).
  • as we have updated `genres`, `developers` before, we just updated `publishers`, and the main driving force behind these changes is no other than @Leo_Pride that sorted out the duplicates and renamed both the `developers` and `publishers` list, the `publishers` which was the smaller of the 2 received over 3000 changes in the process which allows us to standardise the list. this allows us to do things like this https://thegamesdb.net/listpubs.php & https://thegamesdb.net/listdevs.php and we hope to add an API end point that will make this data accessible as well.
  • that was in regards to `developers` and `publishers`, `alternates` also received an update which was completed this morning, on the old site `alternates` were stored as a string list with a comma delimiter, which isn't ideal when it comes to database management or even for data display, for example in the api, this morning this changed when we created a new table that holds this information, as such now the API can return a string array of alternates names for a given title.
  • next change to the API will be the remove of `/Games/Boxart` endpoint for `/Games/Images`, the change is a simple name change to be a better reflection of function, but also comes with a slight change to how filter param works, with the old endpoint filter was a simple param `&filter= boxart`, however filter is also used in other endpoint and using the same name for different functions can be confusing, so instead filter will now be an array `&filter[type]=boxart,banners`.
  • at the same time, we introduced a new endpoint specifically to return platform related images `/Platforms/images?id=1,2,4&filter[type]=boxart`
  • to avoid XSS we html encoded all user submitted data before storing it in the database, however when that information was requested from the api it was returned encoded, since people didn't expect html encoding in son return it has caused confusion, so from now on, all data in the api are decoded, so those of you with web application should encode the data before displaying it, to avoid any attempts at XSS.
  • lastly, this is a change which took place soon after the last announcement, (which I did post later on in the last announcement but), to bring it to more peoples attention, ill mention it again, the endpoint `/Games/ByGameName?name=God+Of+War&filter[platform][]=39&filter[platform][]=12` filter has been changed to a simple list argument `/Games/ByGameName?name=God+Of+War&filter[platform]=39,12`
beside few internal changes this is it for API changes.

The site also received few changes over the past 2 weeks.
  • one I've already mentioned was the introduction of these pages https://thegamesdb.net/listpubs.php & https://thegamesdb.net/listdevs.php which currently are only accessible directly through these links (site top bar is pending an update to include these there).
  • related to the change above, the publisher field is now set based on a predefined values when adding/editing a game, instead of being user input, to ensure linkage between games and standard naming
  • mostly WIP, but the "Add To Collection" button in games view has been enabled, while we currently don't have a display page, you can start building list of games you own, owned or played.
  • lastly, the "Missing X" button in the stats page have been updated and are now in working order, so now everyone can help find missing data
I believe for the most part, API work is done, beside adding few more endpoint (search by developer, search by publisher) with no foreseeable massive changes, so most work will shift site wise for the next few weeks.

Private keys will be issued within 48 hours, no announcement will be made, but you'll be able to find them in the same page as the public keys.

regards
Zer0xFF
Regards
Zer0xFF

Post Reply