API returns 1 zone for all users that have more zones than that

Status

closed

Resolution

fixed

Priority

normal

Severity

minor

Steps to reproduce

Request a user using API v3 Read and count number of zones

Description

The number of zones is 1 when the expected number should be more. On the website and in the app it's correct. If a user has 0 zones, the API returns correctly.

Reported by

Issue ID

#215

Date submitted

2013-06-07T23:19:58+02:00

Attachments

No attachments.

Related issues

No related issues.

Responses

gutelappen

Date: 2013-06-07T23:20:13+02:00

☒ I think this is an important issue.

gutelappen

Date: 2013-06-08T00:01:21+02:00

☒ I think this is an important issue.

Just noticed that users that has no points gets the position 6413 (the number of players this round is at the moment 1393). Before the API returned max players +1 Expected value for SunYour is 1394 at this time.

gutelappen

Date: 2013-06-09T11:12:21+02:00

☒ I think this is an important issue.

Found the problem. The API has changed without notice. Some days ago and in the past the API returned the zones the user currently had, for example zones="3254,1284,29746", this would give a number of zones of 3. Now, all of a sudden this has been changed to the old way of returning the actual number of zones. I think this is the wrong way to make changes in an aka stable version. These kind of changes (if intentionally) should be made to the unstable version of the API and absolutly not be implemented in a version without previous notis. This change has made my application to display the incorrect information.

gutelappen

Date: 2013-06-09T11:21:14+02:00

Some outputs from the API: <?xml version="1.0" encoding="utf-8"?> <turf><user name="SunYour" id="7781" rank="46" points="0" zones="0" pph="0" medals="28,5,16,14,7,27,1,40,43,22,4,48,62,17,2,20,57" place="6514" totalpoints="3261753" distance="17387.292728" blocktime="30" taken="22510" takenunique="211" region="V??stmanland" /></turf> place is returning the wrong value. -------------------------------------------------------------- <?xml version="1.0" encoding="utf-8"?> <turf><user name="gutelappen" id="28745" rank="36" points="31855" zones="36" pph="103" medals="34,9,5,28,16,13,27,6,46,17,55,8" place="114" totalpoints="771180" distance="6733.419548" blocktime="30" taken="2494" takenunique="201" region="Gotland" /></turf> zones are now returning the number of zones owned by this user. From the WiKi on V3 wiki.turfgame.com/en/wiki/T... <user id="2" name="Drassen" blocktime="30" distance="51754.204360" medals="7,9,13,17,17,28,34" place="471" points="4889" pph="27" rank="31" region="Blekinge" taken="1875" takenunique="335" totalpoints="387679" zones="1377,3182,8798,9310,9353,9409,12457" /> This states that the zones attribute should return the id's of the zones that this user holds.

Add comment or attachment

Comments or attachments cannot be added to this issue. If you think that this issue is not solved properly, please submit a new issue.


© 2012-2013. All rights reserved.