Nottingham City Transport Bus API
simonprickett opened this issue · 6 comments
Hi there, I made an API on Cloudflare for Nottingham City Transport bus departures from a given stop ID. Instructions and endpoint are here:
https://github.com/simonprickett/nctx-stop-api
Feel free to use this!
Looks very useful! Is it deployed somewhere?
Then you could either directly connect e.g. v1.nottingham-city.transport.rest
, or let me HTTP-redirect to the API.
Hello yes it operates here: https://nctx.crudworks.workers.dev/?stopId=3390FO07&maxResults=8
Usage info: https://github.com/simonprickett/nctx-stop-api#usage
Do you want to use a transport.rest
subdomain with it, e.g. v1.nottingham-city.transport.rest
?
Not sure how that'd fit in with the Cloudflare setup (mostly as I haven't looked into it). If it's something we can do then I don't see why not.
There seem to be multiple ways to connect a (sub)domain to Cloudflare: https://developers.cloudflare.com/workers/platform/triggers/custom-domains/
Edit: Turns out that only the "full setup" (via NS
records) is available with a "Free" account, but AFAIK doesn't work with subdomains. The "partial (CNAME
) setup" would work technically, but is only available with "Business" & "Enterprise" accounts. It seems like HTTP-redirecting is the only option.
Is it possible to provide an explanatory index page at https://nctx.crudworks.workers.dev
? This way, when I redirect to it from v1.nottingham-city.transport.rest
, users won't be confused.