greptilian logo

IRC log for #rest, 2014-08-08

https://trygvis.io/rest-wiki/

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:46 charlex joined #rest
02:27 wilmoore joined #rest
02:58 wilmoore joined #rest
04:21 tr3onlin_ joined #rest
05:02 systmkor joined #rest
05:22 systmkor joined #rest
07:11 azer_ joined #rest
07:43 rosstuck joined #rest
08:05 graste joined #rest
08:30 _ollie joined #rest
08:51 martinfilliau joined #rest
08:52 _ollie joined #rest
09:06 dEPy joined #rest
09:11 Left_Turn joined #rest
09:19 rosstuck joined #rest
09:49 wilmoore- joined #rest
10:08 rosstuck joined #rest
10:19 azer_ joined #rest
10:22 danielemm joined #rest
10:36 shrink0r joined #rest
10:54 _ollie joined #rest
12:42 charlie_ joined #rest
12:49 _ollie joined #rest
13:00 Bacta joined #rest
13:01 Bacta How would you go about representing an aggregate function over a resource? For example if I have a highscore board for a game and only want to return the scores for levels tagged "arcade" - I would want the total score grouped by user
13:08 dEPy joined #rest
13:11 pdurbin Bacta: what have you tried so far?
13:12 Bacta GET /leaderboards/<leaderboard_id> to get all rankings for a specific leaderboard
13:12 Bacta GET /leaderboards/scopes/<scope> to get aggregate rankings for a scope (say arcade or global)
13:13 Bacta Something about it though doesn't smell right
13:13 Bacta Or perhaps I'm overcooking it?
13:13 * locks is interested in this question
13:13 locks what about query params?
13:14 locks /leaderboards?scope=arcade
13:14 pdurbin how about GET /leaderboards/global
13:17 Bacta Well there's no indication in /leaderboards?scope=arcade or /leaderboards/global that an aggregate is applied behind the scenes
13:18 Bacta Also you have inconsistencies with /leaderboards/global because you could also have /leaderboards/<some_uuid>
13:18 Bacta Or is that not something to be concerned about?
13:19 locks does it matter that it's an aggregate in that way?
13:19 pdurbin hmm, yeah, inconsistent
13:20 Bacta Another option I was toying with was /leaderboards/<uuid> and /scopes/<scope_uuid> but you've then got two routes for data that is very similar
13:20 Bacta */scopes/<scope_uuid>/leaderboards
13:28 pdurbin I have an unrelated question...
13:28 pdurbin endpoint?pretty=true
13:28 pdurbin or
13:28 pdurbin endpoint?indent=true
13:29 pdurbin ... for pretty printing some JSON output... which do you like better? "pretty" or "indent". Solr uses "indent" but I've seen "pretty" in plenty of places
13:42 nkoza joined #rest
13:51 nkoza joined #rest
14:09 fumanchu joined #rest
14:19 rincewind666 joined #rest
14:38 systmkor joined #rest
15:25 * pdurbin went with "pretty": http://stackoverflow.com/questions/23007567/java-json-pretty-print-javax-json/25206426#25206426
15:37 fumanchu wow. and to think the equivalent in Python would be: return json.dumps({"status": "OK", "data": ["foo", "bar"]}, indent='    ')
15:38 locks oh god
15:39 pdurbin heh
15:39 pdurbin java ftw! ;)
15:39 saml let's talk about embedded resources
15:40 saml I have an article and the article uses an image
15:40 saml an image is {"url":"a.jpg", "credit":"flickr"}
15:40 saml an article is {"url":"a.html","image": {"url":"a.jpg", "credit":"flickr"}}
16:01 wilmoore joined #rest
16:16 graste joined #rest
16:32 _ollie joined #rest
16:45 tr3online joined #rest
16:47 tr3online joined #rest
17:20 tr3online joined #rest
17:23 tr3online joined #rest
17:27 tr3onlin_ joined #rest
17:27 nkoza joined #rest
17:56 systmkor joined #rest
19:25 cigarshark joined #rest
19:32 wilmoore joined #rest
19:37 tr3online joined #rest
19:46 dD0T joined #rest
19:50 danizord joined #rest
20:16 danizord joined #rest
20:52 tr3online joined #rest
20:52 tr3online joined #rest
21:27 Mxyzpltk joined #rest
21:35 cigarshark joined #rest

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

https://trygvis.io/rest-wiki/