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: 310
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

arjun wrote: Mon Dec 14, 2020 6:11 pm I was wondering if it would be useful to have an endpoint that returns the list of all game titles and their wos_id (since that seems to be the search term for games) in the zxdb? Just these two fields - game title and the id. Might be useful if someone wanted to write a front-end that could look up any game in the db directly without having to search for it first.
You mean lookup the title by ID?

/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: 3145
Joined: Wed Nov 15, 2017 2:48 pm

Re: ZXDB based Open API

Post by Einar Saukas »

arjun wrote: Mon Dec 14, 2020 6:11 pmI was wondering if it would be useful to have an endpoint that returns the list of all game titles and their wos_id (since that seems to be the search term for games) in the zxdb?
Since even WoS uses ZXDB now, the appropriate search term should really be zxdb_id!
User avatar
arjun
Microbot
Posts: 151
Joined: Sat Sep 19, 2020 7:34 am
Location: India
Contact:

Re: ZXDB based Open API

Post by arjun »

kolbeck wrote: Tue Jan 26, 2021 10:57 pm
arjun wrote: Mon Dec 14, 2020 6:11 pm I was wondering if it would be useful to have an endpoint that returns the list of all game titles and their wos_id (since that seems to be the search term for games) in the zxdb? Just these two fields - game title and the id. Might be useful if someone wanted to write a front-end that could look up any game in the db directly without having to search for it first.
You mean lookup the title by ID?

/Thomas
Yes, the zxdb_id. ;)
User avatar
kolbeck
Manic Miner
Posts: 310
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

Something like this?

Code: Select all

sh-3.2$ curl https://api.zxinfo.dk/v3/games/0002259?mode=titleonly && echo ""
Head over Heels
sh-3.2$
Or in a browser (why would you do that?)
https://api.zxinfo.dk/v3/games/0002259?mode=titleonly

/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
arjun
Microbot
Posts: 151
Joined: Sat Sep 19, 2020 7:34 am
Location: India
Contact:

Re: ZXDB based Open API

Post by arjun »

Ah.. not exactly. Perhaps what I'm proposing isn't feasible but this is what I had in mind:

https://api.zxinfo.dk/v3/games/A

This returns all games starting with A, but only their zxdb_id and title and nothing else. What use is this? Remember the old WoS UI, which had all the letters in the alphabet on top? Clicking them would list a paginated result of all the software of that alphabet. Now, imagine an app that not only allowed you to search for a game (using the search query in zxinfo), but if a user selects an alphabet from a drop down or whatever, it lists all the titles starting with that letter.

Does that make sense? Is there a way to do this already?
User avatar
kolbeck
Manic Miner
Posts: 310
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

I understand - everything can be done, and the old old version of ZXInfo had the feature to list by first letter. I’ll dig into this

/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: 310
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

arjun wrote: Thu Jan 28, 2021 11:42 am Ah.. not exactly. Perhaps what I'm proposing isn't feasible but this is what I had in mind:

https://api.zxinfo.dk/v3/games/A
Try this: https://api.zxinfo.dk/v3/games/byletter/a

For numbers, use https://api.zxinfo.dk/v3/games/byletter/%23

/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
arjun
Microbot
Posts: 151
Joined: Sat Sep 19, 2020 7:34 am
Location: India
Contact:

Re: ZXDB based Open API

Post by arjun »

Awesome! That's so cool.
User avatar
kolbeck
Manic Miner
Posts: 310
Joined: Mon Nov 13, 2017 9:04 pm

Re: ZXDB based Open API

Post by kolbeck »

arjun wrote: Fri Jan 29, 2021 7:07 am Awesome! That's so cool.
If you want to see the 'by letter' in action, it has just been implemented on https://zxinfo.dk :-)

/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
arjun
Microbot
Posts: 151
Joined: Sat Sep 19, 2020 7:34 am
Location: India
Contact:

Re: ZXDB based Open API

Post by arjun »

kolbeck wrote: Fri Feb 05, 2021 10:34 pm
arjun wrote: Fri Jan 29, 2021 7:07 am Awesome! That's so cool.
If you want to see the 'by letter' in action, it has just been implemented on https://zxinfo.dk :-)

/T
Perfect! That's exactly the kind of use case I was pitching.
Locked