AuctionAPI -- can we shorten this request?

Just wondering if on the full auction JSON file, if it would be possible by the powers that be alter the schema a //little// bit

Current example:
{"auc":#######,"item":####,"owner":"XXXXX","bid":$$,"buyout":$$$$$,"quantity":$,"timeLeft":"VERY_LONG"},

As "timeLeft" only has four values of "VERY_LONG", "LONG", "MEDIUM", and "SHORT", how about instead of those, we do 4, 3, 2, 1 respectively? This will greatly reduce the amount of bandwidth consumption necessary per API call of the auctions, and allow for greater flexibility and faster indexing of the auctions (int vs blob/varchar).

Proposed:
{"auc":#######,"item":####,"owner":"XXXXX","bid":$$,"buyout":$$$$$,"quantity":$,"timeLeft":4},
Reply Quote
2 Blood Elf Rogue
0
11/02/2012 08:24 PMPosted by Procsee
This will greatly reduce the amount of bandwidth consumption necessary per API call of the auctions


The data is packed, it wont make such a huge difference.

And the parsing wont differ much as well if int or string and in database nobody force you to use those strings, myself i use ints in the db.
Reply Quote
90 Human Paladin
14880
I don't think the change should be made for two main reasons:

1. It obfuscates the duration field, especially for people just starting to use or learn it.
2. It'd likely disrupt a lot of existent apps.

Having said that, it definitely makes a lot of sense to perform this type of conversion:
TIME_LEFT: {SHORT, MEDIUM, LONG, VERY_LONG} --> {1, 2, 3, 4}
prior to storing in your own database. The motivation should not be primarily for space savings, but also for easier querying. For example, aggregating a particular auction id across multiple dumps based on the maximum TIME_LEFT becomes a lot easier. (This would equate to maximum amount of time we'd expect the auction to live if not bought, and some analysis could then be done based on the delta of first and last seen).
Reply Quote
100 Tauren Shaman
12925
11/02/2012 08:24 PMPosted by Procsee
This will greatly reduce the amount of bandwidth consumption


Download using gzip, eg:

Accept-Encoding: gzip

As part of your request headers. The size difference is on the order of 70%.
Edited by Lunarhawk on 11/5/2012 8:10 AM PST
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]