Pouët HTTP API for Amiga WebDiskWriter

category: code [glöplog]

I'm programming an Amiga tool which is supposed to support a Pouet and/or Demozoo search and download option.

Current version here: http://home.sm41.de/tek/tools/webdiskwriter.lha
Readme: http://home.sm41.de/tek/tools/webdiskwriter.txt
BB Image

I tried https://api.pouet.net/v1/ .
The results are easy to parse even on an 68000 CPU and 1mb of memory, but such a small machine cannot be a https client with reasonable effort. http would be no problem. Is the API available via http somehere, or can it be made available via http also?
added on the 2021-02-25 13:57:48 by bifat bifat
i think you have to either ping gargaj about it or host a local network proxy that queries stuff for you in https and serves it back to you locally as http
added on the 2021-02-25 15:14:38 by psenough psenough
I suppose the API would be easy enough to proxy through, or write a wrapper for running on HTTP. But neither pouet nor demozoo provides actual downloads and there's no guarantee a file they point at will be available on FTP or HTTP. I think some kind of generic proxy would be the best solution.
added on the 2021-02-25 15:23:36 by grip grip
@Gargaj: Ping :-)
I've successfully proxied Aminet searches, and I'm considering to include the Aminet search option in the tool as well. On the other hand I don't really like proxies. They pose unneeded complexity and points of failure. In the case of Aminet it was for the sheer absence of a proper API, and I had to write a parser for quirky HTML (and request several result pages sequentially, yuck!) to deliver something nicely machine-readable. In the case of Pouet however, there is already a proper API, and it would be just a few configuration lines to additionally deliver proper results per http I would suppose.
added on the 2021-02-25 16:35:42 by bifat bifat
BB Image
added on the 2021-02-25 16:43:06 by Gargaj Gargaj
Is that you, webmaster@pouet.net?
added on the 2021-02-25 16:45:12 by bifat bifat
Among others yes.

Sadly I have no access to configuring whether a site is HTTPS only or not, but I'll talk to Redhound about it at some point.
added on the 2021-02-25 16:48:51 by Gargaj Gargaj
I've setup a search proxy and a HTTP->HTTPS proxy for testing purposes. As it turns out, I can't search by name and limit the search by platform at the same time. Even if I'm doing the filtering myself in the proxy, there's a hard limit on the number of search results which seems too limited. Maybe as a stopgap it would work until a more extensive search system is available at some point, as Gargaj has put it. Sorry for the noise, I should have looked up the API source at github first.
added on the 2021-02-25 19:05:29 by bifat bifat
Btw, any reason for not using http://api.pouet.net/ directly?
added on the 2021-02-26 10:01:28 by Gargaj Gargaj
@Gargaj: Works - or works now. Yesterday I was under the impression it would always redirect to https, and not answer on http. I still go through my proxy to consolidate results for the platforms "73" and "71" and simplify the JSON reply. It'll be possible to search for entries of which you know the name quite accurately.
added on the 2021-02-26 10:14:30 by bifat bifat
Yesterday I was under the impression it would always redirect to https, and not answer on http.

It fooled me too; Chrome seems to shepherd you towards HTTPS even if you explicitly want to go to HTTP.
added on the 2021-02-26 10:24:02 by Gargaj Gargaj
That's because the server sends a Strict-Transport-Security header (good thing!); so if you previously visited pouet.net HTTPS it will stay on HTTPS. But (at least in Firefox) if you open the HTTP page in a private window, it should forget that STS header.
Yeah but I don't remember setting that explicitly for api.pouet.net - I guess it was added server-wide at some point.
added on the 2021-02-26 11:02:43 by Gargaj Gargaj
"Strict-Transport-Security: max-age=2592000; includeSubDomains"

if you visit the main page with HTTPS, it will also keep using that for all subdomains.
hmh, an api call based on bbs_topics.id that blurts out a json with all posts of that topic might also be a nice to have. e.g. for parsing all those youtube/vimeo urls from demoish videos or whatever
Will there also be an "AmigaWebDiskReader"? That would be awesome, we could just give this service's address to all those pesky fundamentalists who for unexplainable reasons still insist on spreading their demos by snail mail even though a vast majority of scientists agrees that we currently live in the year 2021 :P
added on the 2021-02-26 15:07:53 by havoc havoc
Scientists also agree that it's the year 1442 in some countries. Your point being?
added on the 2021-02-26 15:12:01 by bifat bifat
The highly ironical nature of this thread in light of a certain debate that recently took place on this site, obviously :)
added on the 2021-02-26 15:24:26 by havoc havoc
What debate would that be?
added on the 2021-02-26 15:39:43 by bifat bifat
Luckily whatever that debate is is no longer relevant to this thread which is pretty much answered!
added on the 2021-02-26 15:52:15 by Gargaj Gargaj