public-transport / transport.rest

Information about the *.transport.rest APIs.
https://transport.rest/
34 stars 4 forks source link

Add poland-public-transport-api to transport.rest #13

Closed konhi closed 2 years ago

konhi commented 2 years ago
derhuerst commented 2 years ago

Such a neat project!

poland-public-transport-api - https://poland-public-transport-api.azurewebsites.net/

The public instance is currently reported as being down. Are you planning to get it up online, or shall someone else host it?

stable, hosted on Azure student's plan (I hope it doesn't have any hidden quotas! 😅), CORS enabled, no apikey or any ratelimits

✨

I am open for other contributors to extend it, or I'll do it by myself if I'll have interest in other regions - therefore I suggest poland.transport.rest as domain!

Sure, let's do it. What DNS records to you need? A CNAME should be fine, right?

konhi commented 2 years ago

Such a neat project!

Thanks! 💕

The public instance is currently reported as being down. Are you planning to get it up online, or shall someone else host it?

Well, it seems that Azure indeed had hidden quotas I didn't know about - $100, and somehow I used it in one week! Sorry for that inconvenience, I'm going to let you know about DNS records and other details when I will manage to host it somewhere else!

derhuerst commented 2 years ago

There are probably better options, but Vercel and Fly offer free plans. They suspend the server process if no traffic happens, but I guess that's fine for now.

Alternatively, you might also ask @juliuste if you can use the Kubernetes cluster that he set up for *.transport.rest APIs and related projects.

konhi commented 2 years ago

There are probably better options, but Vercel and Fly offer free plans.

Yeah, I'm currently looking at Cloudflare Workers, it's very similar to Vercel, but I've never heard about Fly, I'm going to check it out as well!

I'd be happy to get support, if it wouldn't bother anyone and I won't be able to host it by myself. I will let know there.

derhuerst commented 2 years ago

Support with using which of the options?

The instructions for using @juliuste's Kubernetes cluster are quite technical, but you can try following them and ask for help either here or DM him.

derhuerst commented 2 years ago

@konhi ping 🙂 – Is there anything I can help you with regarding the deployment?

konhi commented 2 years ago

@derhuerst Thank you for asking! Cloudflare Workers did seem to be a good choice for API wrapper like this! My API is already running! I'm working on finishing touches, like docs!

derhuerst commented 2 years ago

Let me know when it's ready to be mentioned at the transport.rest main page. Remember, all of these projects are personal and/or experimental projects, so it's perfectly fine to publish something half-done!

konhi commented 2 years ago

@derhuerst I think my project is ready to be published at the transport.rest! I think it would be best if it points only to docs page, because *.workers.dev domain can change, or there can be many instances of this API.

Docs page is available at http://konhi.github.io/poland-public-transport-api/. It uses GitHub pages, so this link might be useful. If I could help somehow, let me know!

derhuerst commented 2 years ago

I think it would be best if it points only to docs page, because *.workers.dev domain can change, or there can be many instances of this API.

It would be cool to have the actual API available via poland.transport.rest (or a subdomain of that), so that you can easily write scripts using the API, but if there's no stable domain for the Cloudflare Worker, then hosting the docs at poland.transport.rest is the best we can do.

Docs page is available at http://konhi.github.io/poland-public-transport-api/. It uses GitHub pages, so this link might be useful. If I could help somehow, let me know!

I have configured a CNAME record for poland.transport.rest, pointing to to kochi.github.io. It seems like you have already configured GitHub to use this custom domain, so things should be working soon, right?

derhuerst commented 2 years ago

You can also make sure to enforce HTTPS with the GitHub Page.

konhi commented 2 years ago

It would be cool to have the actual API available via poland.transport.rest (or a subdomain of that), so that you can easily write scripts using the API, but if there's no stable domain for the Cloudflare Worker, then hosting the docs at poland.transport.rest is the best we can do.

Definitely! It might be possible in the future, I will make sure to let you know in that case.

I have configured a CNAME record for poland.transport.rest, pointing to to kochi.github.io. It seems like you have already configured GitHub to use this custom domain, so things should be working soon, right?

Awesome! Everything works perfectly! ✨ Could you please add poland.transport.rest to main website?