Showing Posts For AlSquire.9203:

List of apps/websites using the API

in API Development

Posted by: AlSquire.9203

AlSquire.9203

Mine: http://gw2api-angularjs.herokuapp.com/

It uses “desktop notification” so you know when a world boss is active without keeping an eye to the site, with the conditions that you use a Webkit (Chrome or Safari) browser and don’t play fullscreen.

Feedbacks are welcomed.

Thread here: https://forum-en.gw2archive.eu/forum/community/api/AngularJS-example

AngularJS example

in API Development

Posted by: AlSquire.9203

AlSquire.9203

Ok, Angular is a tough beast to tame (pressing F is not enough). I just deployed a new version which should be actually useful (to me at least).

Added:

  • Auto refresh, you can choose the time interval.
  • Dragon events states (more to come as it is really easy to add them, I’m just lazy right now).
  • Desktop notifications of active dragon events, the actual useful feature, for Webkit browsers (Chrome and Safari).
  • A better look with twitter bootstrap, but still need more work.

And now I’m gonna test it while doing my daily ^^

Edit: notifications are not working <o>
Edit: should be fixed

(edited by AlSquire.9203)

API not working fine

in API Development

Posted by: AlSquire.9203

AlSquire.9203

I’m talking about the API in general, with wvw matches and even worlds sometime missing. I suppose there is some behind the scene work going on right now.

API not working fine

in API Development

Posted by: AlSquire.9203

AlSquire.9203

A have a lot of erratic returns with missing lines since the last hour or so.

Return proper error codes

in API Development

Posted by: AlSquire.9203

AlSquire.9203

Sure, a 4xx is expected because it is client side error, and 400 fits with the error description “invalid match_id”, no objection.

Or maybe 418 is better… dunno.

AngularJS example

in API Development

Posted by: AlSquire.9203

AlSquire.9203

Nice! Looking forward to seeing this evolve. If you’re interested in collaborating with other API developers in the future, I’ve got an effort going here:

https://forum-en.gw2archive.eu/forum/community/api/Want-to-collaborate-on-GW2-apps-Start-here/

Thanks for the interest. I’m not sure if I want to invest me more than this hack and what I plan to do with it (so much things to do, so little time… and I haven’t done my daily yet <o>) but thanks for the proposition Now that being said, everything I’ll do on it will stay open source.

AngularJS example

in API Development

Posted by: AlSquire.9203

AlSquire.9203

Now selecting a world change the uri and can be bookmarked.
For example #/world/2002 for Desolation.

Return proper error codes

in API Development

Posted by: AlSquire.9203

AlSquire.9203

I was implying that the stackoverflow thread (especially the most voted answer) convince me that 404 is appropriate even with the id part in a querystring. But ultimately it’s an API design choice.

(I’m used to the /stuff/id pattern so ?xxx_id=123 feels a little weird to me ^^)

Return proper error codes

in API Development

Posted by: AlSquire.9203

AlSquire.9203

404 seems a good choice to me, but it made me wonder if this is more relevant to an URI without a querystring (something like https://api.guildwars2.com/v1/wvw/match_details/1.json )

Seems not, as it is discussed here : http://stackoverflow.com/questions/3821663/querystring-in-rest-resource-url

Also I found this site which discuss REST API creation and different status codes. Can be useful.

AngularJS example

in API Development

Posted by: AlSquire.9203

AlSquire.9203

Wouhou! First on an AngularJS version. I’m not an expert yet with it but it’s pretty cool stuff, especially when dealing with REST APIs.

It’s just a simple example. Select a world, see its WvW “match” scores and opposants in an ugly UI. It’s full client side, with one html and one js files.

Demo here: http://gw2api-angularjs.herokuapp.com/
Code here: https://gist.github.com/AlSquire/5624137 (feel free to copy, reuse…)

I’m planning to:

  • Allow a world_id param in the url so the page can be refreshed and bookmarked.
  • Add events and their states for the selected world, maybe not all but the major ones, or let the user do its own selection.
  • Add WvW objectives.
  • Try to style it a little, responsive design FTW here.
  • Add some cache, I don’t want to add more lag to Claw ^^

(edited by AlSquire.9203)