Showing Posts For noobinator.3816:

List of apps/websites using the API

in API Development

Posted by: noobinator.3816

noobinator.3816

I’ve created an Android app that focuses on items (for now). It allows you to search for items by name, item type, vendor value, and item rarity. You can sort the results, and view each item individually.

I’ll update this post once it’s live on the Play Store. It’s now live on the Play Store. Your feedback is greatly appreciated: https://play.google.com/store/apps/details?id=com.enragedginger.gw2.companion

Next, I plan to:
1. Allow for searches on more than just name. (This is done.)
2. Display more data than just the basic item data.
3. Make it pretty
4. Add support for recipe data and the other endpoints too.

(edited by noobinator.3816)

Possible issue with "buff" property

in API Development

Posted by: noobinator.3816

noobinator.3816

Cliff, thanks for the response.

At this point, I already have the parsing all figured out and working for the item_details API using Jackson. It was a bit “hacky,” but was definitely quicker than manually writing the property-by-property parser by hand. If the empty objects were returned as nulls, empty curly braces, or not at all, that would greatly simplify my code.

Also, it would be great to have sample objects that way. This would greatly simplify development.

Thanks again!

Possible issue with "buff" property

in API Development

Posted by: noobinator.3816

noobinator.3816

Let me start off by saying that this API is great. Thank you so much for it!

I’m in the process of writing an Android app to interact with the API and do cool things (like everyone else on this forum). Unfortunately, I’ve run into a bit of a snag. Usually, when parsing JSON, I just use Google GSON, but occasionally I run into minor issues that end up complicating things.

In particular, item_detail objects which are weapons, have a buff property (item_detail->weapon->infix_upgrade->buff). In cases where the infix_upgrade has a buff, it is a JSON object, however, if the buff does not exist, then it is a String.

For example, Item 38875 has a buff, while item 26706 does not have a buff.

This causes problems for Google GSON and possibly other parsers. So, I have a few questions:

1. Is this an actual defect that should be fixed or do I just need to use a different parser? I’ve found a work around for the time being, but I would like to not have to use it as it will slow down my app.
2. Is this going to be a recurring theme with the API (that is, objects are either present or are Strings, but are never empty or null)?

EDIT: After some more digging, it seems like this is going to be a recurring theme as I’m now running into the same problem with the infix_upgrade itself.

EDIT2: I switched over to using Jackson to parse the data into my objects, but it dislikes this “feature” too.

(edited by noobinator.3816)