[API Suggestion] Few generic API Suggestions

#1 - Sept. 27, 2013, 2:09 p.m.
Blizzard Post

#1

It would be nice that with every request a index in time was returned, in the form of a typical unix timestamp 1380310841 (see here)

So that when calling any API a optional parameter would be passed such as
https://api.guildwars2.com/v1/event_details.json?since=1380310841

Would only provide event details of what has changed since this time stamp.

This might lighten the load for processing and updates as well.

#2

I see some basic information about the data type’s such as Numeric or Int or String

But it would be good if precision was provided as well and a simpler way to take note of the data such as (for the wiki)

String(42)
Numeric(16,2) or Numeric(4,0) etc..
Date(YYYY-MM-DD)
Datetime(YYYY-MM-DD HH:MM:SS)
unixtimestamp()
LIST[String(32),Numeric(3,1)]

Just some suggestion, does not cover all data types such as signed or unsigned numeric.

Also it would be good if the Json api would take a API parameter to output this information with the build number such as

https://api.guildwars2.com/v1/event_details.json?datatypes=true

To display that information in json format of
field_id, fieldname, type, precision, parent_id

where parent id is used for lists (nesting)

This is just a quick suggestion, I have not hashed out everything and the forum search feature would not work at all in any browser to determine if anyone suggested this or similar.

#8 - Oct. 16, 2013, 5:06 p.m.
Blizzard Post

Offering alternative data representations (such as XML) is planned, but not anytime soon. In the meantime I’d recommend using a simple JSON to XML translation library, of which there are several. There are even web-based translators you can play around with.