Live data from Hacker News

Get information about any country via a RESTful API

restcountries.eu

21–27 of 27 posts

Re: Get information about any country via a RESTful API

#22
post #10

This is nice if considered a programming exercise but it's actually pretty useless for real world use. This data is static, that is it very rarely changes. The whole dataset is also very tiny. It's just better to store this data in-house and don't provide unnecessary point of potential failure by using an external service. An idea on how to make it more useful is to provide downloadable data dump in several formats s…

>> It's just better to store this data in-house and don't provide unnecessary point of potential failure by using an external service.

Isn't this the point of rfc2616 sec13? I haven't looked, but if there are etags etc then I think a computer is better than a human at looking for new data, no?

Re: Get information about any country via a RESTful API

#25
post #10

This is nice if considered a programming exercise but it's actually pretty useless for real world use. This data is static, that is it very rarely changes. The whole dataset is also very tiny. It's just better to store this data in-house and don't provide unnecessary point of potential failure by using an external service. An idea on how to make it more useful is to provide downloadable data dump in several formats s…

totally get your point. although there are cases when using an external service is actually more convenient. maybe riskier but still convenient. thanks.

Re: Get information about any country via a RESTful API

#26
post #17

Obligatory warning: API is absolutely not restful.

Just wanted to add some thoughts on how one could try to make this RESTful. First, if it were me, I'd pick a media type that can express hyperlinks in JSON (since JSON knows nothing about hyperlinks), maybe something like HAL [1]. Next, I would define my link relations for this API, which in this case would be a collection of countries and the countries themselves (so at least two different types of resources). After…

thanks for your input. i'll think about this
Post reply on HN