Diskussion:TurfAPI V2

Version från den 26 januari 2013 kl. 09.43 av GuteLappen (Diskussion | bidrag) (No "id" attribute in <zone> element from respons when calling http://api.turfgame.com/v2/zones)
(skillnad) ← Äldre version | Nuvarande version (skillnad) | Nyare version → (skillnad)

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)