AngularJS example

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)

AngularJS example

in API Development

Posted by: Blumoon.5437

Blumoon.5437

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/

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.

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

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)