Starting up
The api uses JSON returns for everything I believe, so starting there wouldnt hurt. That way you’d know how AS would handle the returns.
The api uses JSON returns for everything I believe, so starting there wouldnt hurt. That way you’d know how AS would handle the returns.
Thanks a lot, I’ll look it up!
As an example, here’s a snip from my DH’s api readout in the inventory section-
,{"id":45053,"size":18,"inventory":[{"id":20796,"count":17,"binding":"Account"},{"id":78462,"count":4,"binding":"Account"},{"id":70827,"count":1,"binding":"Account"},{"id":45175,"count":77,"binding":"Account"},{"id":45176,"count":16,"binding":"Account"},{"id":74598,"count":1},{"id":23000,"count":1,"binding":"Account"},{"id":12774,"count":13,"binding":"Account"},{"id":12245,"count":42,"binding":"Account"},{"id":73539,"count":1,"binding":"Account"},{"id":71283,"count":1,"binding":"Character","bound_to":"Basandra Skye"},{"id":24884,"count":3},{"id":24773,"count":1},{"id":36507,"count":6,"binding":"Account"},{"id":44206,"count":2,"binding":"Account"},{"id":24531,"count":1},{"id":24557,"count":1},{"id":24769,"count":1}]},{"id":9591,"size":20,"inventory":[{"id":75919,"count":1},{"id":37595,"count":1},{"id":38566,"count":1},{"id":72757,"count":1,"binding":"Account"},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]},{"id":9591,"size":20,"inventory":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]},{"id":9591,"size":20,"inventory":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]},{"id":38011,"size":20,"inventory":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]},{"id":9579,"size":18,"inventory":[null,null,null,{"id":26544,"count":1,"skin":4214,"upgrades":[24600],"binding":"Character","bound_to":"Basandra Skye"},{"id":19675,"count":77,"binding":"Account"},null,{"id":12467,"count":12},{"id":78305,"count":10,"binding":"Account"},{"id":70013,"count":1,"binding":"Account"},{"id":73718,"count":1,"binding":"Account"},{"id":77093,"count":1,"binding":"Account"},{"id":68369,"count":1,"binding":"Account"},{"id":69887,"count":1,"binding":"Account"},{"id":66999,"count":1,"binding":"Account"},{"id":19984,"count":22,"binding":"Account"},{"id":19992,"count":26,"binding":"Account"},{"id":20017,"count":15,"binding":"Account"},{"id":20018,"count":23,"binding":"Account"}]}]}
The closing tags wont all match since this is from a random point to the end of the return. You can get this info yourself as well once you create an api key by browsing to https://api.guildwars2.com/v2/characters/Character%20Name?access_token=<somethingthatlookslikeaserialcode>
Just use the noobiest character you’ve got for this though. The return is a condensed JSON output, which means minimal (ie almost zero) whitespace, so it definitely looks fugly if you have a looooooooooooooooooooooooooot of unlocked recipes and bags.
edit- case in point, there’s also no line breaks either, so you’re only seeing like 1/30th of the return in my post. If you quote this post, you should be able to see the full thing. I hope.
Web Programmer
Just use the noobiest character you’ve got for this though. The return is a condensed JSON output, which means minimal (ie almost zero) whitespace, so it definitely looks fugly if you have a looooooooooooooooooooooooooot of unlocked recipes and bags.
You can make it look nicer in-browser by installing a JSON prettifier (e.g. JSONView for Firefox or Chrome).
I would suggest as a starting point by making a gem-to-gold/gold-to-gem conversion program since the JSON for that is very simple. Example;
{"result":{"gem_to_gold":204100,gold_to_gem
That’s the current result right now for a 100 gem exchange. The result for gem_to_gold for example is in gold, silver, copper format, so that would be;
100gem = 20g 41s 00c
Then to purchase 100 gem using gold;
32g 40s 00c = 100gem
I made a program before that allows the user to enter the gem amount and will return the exchange rate for the user to see. One caveat is, the result from the JSON is not in realtime, but that’s besides the point.
Full set of 5 unique skills for both dual-wield weapon sets: P/P and D/D – Make it happen
PvE – DD/CS/AC – If that didn’t work, roll a Reaper or Revenant.