Diskussion:TurfAPI V2
Fact:
http://api.turfgame.com/v2/zones returns all zones from the game.
Problem:
Returns all zones WITHOUT "id" attribute for each zone. This makes it impossible to cross-reference against http://api.turfgame.com/v2/zones/id:[id of zone] without iterating through every zone by "name" attribute to retrieve the "id" attribute.
Proposal to solution:
Add attribute "id" to the response when calling http://api.turfgame.com/[version number]/zones This proposal also makes it easier for developers when updating their local cache and reduces the number of requests and data size transferred from TurfAPI.
Workaround:
Developer can create a local cache of the zones by calling http://api.turfgame.com/v2/zones Iterate through every zone using http://api.turfgame.com/v2/zones/id:[id of zone] and cache the "id". Sparsely check for new zones and update local cache.
--GuteLappen 26 januari 2013 kl. 09.43 (UTC)