ZXDB based Open API

This is the place for general discussion and updates about the ZXDB Database. This forum is not specific to Spectrum Computing.

Moderator: druellan

User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

Hi

Website and API updated to latest ZXDB (Feb 03 - 2019)

API now returns additional prices, if available, on each release - as a result of internal re-structuring of ZXDB on prices.

/Thomas
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
Einar Saukas
Bugaboo
Posts: 3070
Joined: Wed Nov 15, 2017 2:48 pm

Re: ZXDB based Open API

Post by Einar Saukas »

Thank you!
User avatar
druellan
Dynamite Dan
Posts: 1466
Joined: Tue Apr 03, 2018 7:19 pm

Re: ZXDB based Open API

Post by druellan »

kolbeck wrote: Tue Feb 05, 2019 1:08 pm Website and API updated to latest ZXDB (Feb 03 - 2019)
Thanks!
BTW, I'm getting some broken images for the MIA games, but also for not-so-popular ones that actually have a screenshot. Tested on Chrome and Firefox.

Image

The problem seems related to the in.game screens

Image
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

It’s a known issue- I’m working on it :-)

/T
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

[mention]druellan[/mention] - images should be working again

/T
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

ZXDB Open API updated to 25.02.2019 release.

The ZXDB contains some internal changes which affects the output from the API.

- Mod of / inspired by is now NxN relations, which means the "mod_of" property now is returned as an array.

Code: Select all

"mod_of": [
	{
		"id": "0003899",
		"is_mod": 1,
		"type": "Mod from",
		"title": "Project Future",
		"publisher": "Micromania",
		"machinetype": "ZX-Spectrum 48K"
	},
	{
		"id": "0009408",
		"is_mod": 1,
		"type": "Mod from",
		"title": "Sabre Wulf",
		"publisher": "Ultimate Play The Game",
		"machinetype": "ZX-Spectrum 48K"
	}
]
The "relationtype" is added to the output, taken directly from ZXDB (can be "Mod of" or "Inspired by"), will by next release replace the "is_mod" property, used in the old ZXDB structure.

/Thomas
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

ZXDB Open API v1.5.0 has just been released.

https://api.zxinfo.dk/doc/

Added 'tiny' outputmode, containing the following properties:
  • fulltitle
    yearofrelease
    machinetype
    type + subtype (genre)
    publisher
    additionals (for screens)
Added API endpoint for fetching random SOFTWARE entries from the following categories:
  • Adventure Game
    Arcade Game
    Casual Game
    Game
    Sport Game
    Strategy Game
Are these changes essential? Not really, but they are required in my upcoming project :o

/T
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
Turrican
Microbot
Posts: 187
Joined: Thu Apr 12, 2018 5:48 pm
Location: Brazil

Re: ZXDB based Open API

Post by Turrican »

Hi kolbeck!
A doubt: I updated the ZX App with Downloads Tab where we can download any software on the external storage of our device.
Old softwares are in the "releases" section where I´m getting the urls.
But new softwares are in the "additionals" section.
How can I know if I have to take url from releases or additionals?

Thank you!
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

[mention]Turrican[/mention] - thanks for the observations :-)

The short explanation is that in old WOS data, each "game release" is linked to a machine type - this is not the case in ZXDB. I guess the reason is that this would require a one-to-many relation and a restructure of the database model. The API used this information to determine if a file has to be in the release part or the additional section.

I've changed the logic, so now the API assumes if the file is on of the known "game" formats. such as tap, tzx, disk image etc. it belongs to the release section, otherwise the additional part. Not perfect - but at least it seems to be working for all my test cases.

So for now, you can assume that the software for an entry is to be found in the release section - otherwise let me know of any cases where this does not apply.

/Thomas
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
Turrican
Microbot
Posts: 187
Joined: Thu Apr 12, 2018 5:48 pm
Location: Brazil

Re: ZXDB based Open API

Post by Turrican »

Great!!!
Now we get all downloads.
Thank you very much!
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

You're welcome :-)

I'm this far for now.... hehe

Image
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
Turrican
Microbot
Posts: 187
Joined: Thu Apr 12, 2018 5:48 pm
Location: Brazil

Re: ZXDB based Open API

Post by Turrican »

Great!!
User avatar
Einar Saukas
Bugaboo
Posts: 3070
Joined: Wed Nov 15, 2017 2:48 pm

Re: ZXDB based Open API

Post by Einar Saukas »

kolbeck wrote: Mon Mar 04, 2019 7:55 pmThe short explanation is that in old WOS data, each "game release" is linked to a machine type - this is not the case in ZXDB. I guess the reason is that this would require a one-to-many relation and a restructure of the database model.
What do you mean?

kolbeck wrote: Mon Mar 04, 2019 7:55 pmI've changed the logic, so now the API assumes if the file is on of the known "game" formats. such as tap, tzx, disk image etc. it belongs to the release section, otherwise the additional part. Not perfect - but at least it seems to be working for all my test cases.
Instead of file format, it's more reliable to check file type:

Code: Select all

filetype_id IN (46, 47) OR filetype_id BETWEEN 8 AND 22
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

Einar Saukas wrote: Tue Mar 05, 2019 12:19 pm
kolbeck wrote: Mon Mar 04, 2019 7:55 pmThe short explanation is that in old WOS data, each "game release" is linked to a machine type - this is not the case in ZXDB. I guess the reason is that this would require a one-to-many relation and a restructure of the database model.
What do you mean?
I used the machinetype_id in the downloads table, however it looks like its only valid for the old WOS entries. All new downloads (software) added to ZXDB seems to have machinetype_id set to NULL.

However, it's not a big problem - i will just use your suggested where clause instead :-)

/T
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
Turrican
Microbot
Posts: 187
Joined: Thu Apr 12, 2018 5:48 pm
Location: Brazil

Re: ZXDB based Open API

Post by Turrican »

Hi [mention]kolbeck[/mention] !
One doubt: I´m getting trouble to get the front inlay image of the cassetes.
Sometimes I get the back inlay, sometimes the inside inlay... because there is no order on images.
Example:
Pit Fighter has the front inlay in the 2nd image:
/zxdb/sinclair/entries/0003742/Pit-Fighter_Back.jpg
/zxdb/sinclair/entries/0003742/Pit-Fighter_Front.jpg

And Out Run is on the first image:
/pub/sinclair/games-inlays/o/OutRun.jpg
/pub/sinclair/games-inlays/o/OutRun_2.jpg
/pub/sinclair/games-inlays/o/OutRun_Inside.jpg

Is there a way where the front inlay is always the first one?

Thanks!
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

Hi,

From what I can see, ZXDB (or old WoS) didn't have detailed information about inlays, either it's an inlay or not. However I think there was something about the filenaming for ZXDB, where the filename indicates the type of inlay. You will see it on the /zxdb/ files, as these are added to ZXDB.

Maybe [mention]Einar Saukas[/mention] has a better idea of how to classify the inlays?

/Thomas
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

A new year - and finally ZXInfo API has been updated with latest ZXDB release :D

Starting here in 2020 I'm also happy to announce that ZXInfo API got a new client, the multi-machine emulator ZEsarUX has a new Spectrum online game browser using the ZXInfo API to search and query game data. The online browser is availabel from ZEsarUX-8.1 beta 1. Find more information and latest release here: https://github.com/chernandezba/zesarux/releases

This brings the number of official ZXInfo API clients up to 5 - ranging from web sites to android and tv apps - HAPPY NEW YEAR!
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

Another update, the ZXInfo API has been updated with latest release of ZXDB (04.03.2020 release).

Ta da...

/Thomas
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
Einar Saukas
Bugaboo
Posts: 3070
Joined: Wed Nov 15, 2017 2:48 pm

Re: ZXDB based Open API

Post by Einar Saukas »

kolbeck wrote: Fri Jan 03, 2020 5:08 pm Starting here in 2020 I'm also happy to announce that ZXInfo API got a new client, the multi-machine emulator ZEsarUX has a new Spectrum online game browser using the ZXInfo API to search and query game data. The online browser is availabel from ZEsarUX-8.1 beta 1. Find more information and latest release here: https://github.com/chernandezba/zesarux/releases

This brings the number of official ZXInfo API clients up to 5 - ranging from web sites to android and tv apps - HAPPY NEW YEAR!
I forgot to reply about it... This is fantastic! :)
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

Hello out there...

Just a small update on the API. As part of my clean up and other maintenance, a few new endpoints have been added to the API.

* metadata - some help to search for the right values
* suggest - a helper for implementing autocomplete and autosuggestion
* graph path - Six degrees of separation between two names

The API documentation has been update, in case you want to try it out. Find it here: https://api.zxinfo.dk/doc/

/Thomas
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
Turrican
Microbot
Posts: 187
Joined: Thu Apr 12, 2018 5:48 pm
Location: Brazil

Re: ZXDB based Open API

Post by Turrican »

Hi [mention]kolbeck[/mention] .
PM sent!

:)
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

[mention]Turrican[/mention] nothing there, did you press the ‘send’ button? :-)
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

The ZXDB Open API has been updated with latest ZXDB release.

Together with this update, a few new endpoints also found its way. The new endpoints are helpers for implementing autosuggestion/autocomplete:
* suggest (creates suggestions on titles, publisher and authors)
* suggest author (creates suggestions on author only)
* suggest publisher (creates suggestions on publisher only)

Too see them in action, take a look at https://zxinfo.dk

/Thomas
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
kolbeck
Manic Miner
Posts: 309
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

The ZXDB Open API has been updated with latest ZXDB release 14.07.2020

/T
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
User avatar
Pobulous
Dynamite Dan
Posts: 1343
Joined: Wed Nov 15, 2017 12:51 pm

Re: ZXDB based Open API

Post by Pobulous »

I get a 404 on the doc link - https://api.zxinfo.dk/doc/
Locked