| Time |
S |
Nick |
Message |
| 00:56 |
|
|
zama joined #rest |
| 01:18 |
|
|
fuzzyhorns joined #rest |
| 01:41 |
|
sulaiman |
The API I am working on is for reverse geocoding parking zones in my city, I looked at two other popular geocoding apis for reference, |
| 01:41 |
|
sulaiman |
http://api.tiles.mapbox.com/v4/geocode/mapbox.places/{lat},{long}.json? |
| 01:42 |
|
sulaiman |
and, https://maps.googleapis.com/maps/api/geocode/json?latlng=x,y |
| 01:43 |
|
sulaiman |
From what I have read, the apis should not use verbs, and a URL should point to a resource |
| 01:44 |
|
sulaiman |
and they both include "json" in the URL, shouldn't that be passed as an header? |
| 01:45 |
|
sulaiman |
is {lat} and {long} something I should be passing as parameters, or as a body text? |
| 01:48 |
|
sulaiman |
I was thinking of passing { "coordinates": { "latitude": x, "longitude: y } } to myapi/zones/ |
| 03:16 |
|
|
fuzzyhorns joined #rest |
| 06:31 |
|
|
_ollie joined #rest |
| 07:04 |
|
|
Left_Turn joined #rest |
| 07:33 |
|
|
quimrstorres joined #rest |
| 08:12 |
|
|
interop_madness joined #rest |
| 09:06 |
|
|
quimrstorres joined #rest |
| 11:20 |
|
|
locks joined #rest |
| 13:07 |
|
|
huckleberry78 joined #rest |
| 13:39 |
|
|
quimrstorres joined #rest |
| 14:06 |
|
|
Mxyzpltk joined #rest |
| 14:24 |
|
|
huckleberry78 joined #rest |
| 14:25 |
|
|
huckleberry78 joined #rest |
| 14:46 |
|
|
huckleberry78 joined #rest |
| 15:26 |
|
|
quimrstorres joined #rest |
| 15:48 |
|
|
_ollie joined #rest |
| 16:08 |
|
|
huckleberry78 joined #rest |
| 16:20 |
|
|
_ollie joined #rest |
| 17:17 |
|
|
quimrstorres joined #rest |
| 17:19 |
|
|
sulaiman joined #rest |
| 17:20 |
|
sulaiman |
Hello. Is this a good rest URI, "https://maps.googleapis.com/maps/api/geocode/json?latlng=x,y" ? |
| 17:22 |
|
whartung |
yes |
| 17:23 |
|
|
Mxyzpltk joined #rest |
| 17:24 |
|
sulaiman |
whartung, is it a good choice to put "json" in the URI, instead of using the "Accept" header? |
| 17:25 |
|
whartung |
no, not really, you should rely on the header. |
| 17:26 |
|
sulaiman |
also, is it not discouraged to use verbs in a URI? is 'geocode' a resource? |
| 17:27 |
|
sulaiman |
wouldn't, https://maps.googleapis.com/maps/api/locations/json?latlng=x,y" be better? |
| 17:44 |
|
|
quimrstorres joined #rest |
| 17:52 |
|
sulaiman |
would your API accept latlng as a query parameter, or HTTP message body? |
| 18:07 |
|
sulaiman |
are there any rules to help one decide? |
| 18:36 |
|
|
quimrstorres joined #rest |
| 19:03 |
|
|
quimrstorres joined #rest |
| 19:27 |
|
|
_ollie joined #rest |
| 19:30 |
|
trygvis |
sulaiman: having it as a part of the query is better for caching |
| 19:32 |
|
|
Coldblackice joined #rest |
| 19:44 |
|
fumanchu |
although I don't know how useful caching is in a space that's usually 10 ** 17 points |
| 19:47 |
|
asdf` |
fumanchu, oh, those aren't uniformly distributed |
| 19:48 |
|
asdf` |
i'd imagine lots of requests come from geoip things, which often map huge subnets to the same point |
| 19:49 |
|
asdf` |
(and there's less named places than 10**17 anyway) |
| 20:13 |
|
|
igitoor joined #rest |
| 20:15 |
|
|
igitoor joined #rest |
| 20:58 |
|
|
huckleberry78 joined #rest |
| 23:11 |
|
|
impl joined #rest |
| 23:23 |
|
|
dkm joined #rest |