Announcements
Breaking change: Player's clubs endpoint

Breaking change: Player's clubs endpoint

Avatar of andreamorandini
| 5

We found out that Player's Clubs endpoint isn't adhering to our rule of providing a reference to the object in the "@id" field and to show the link to the Web page in "url" field.

We wan't to solve this discrepancy and, in order to minimize the troubles and to help developers to transition to the new format, we will refactor the endpoint in three steps.

Current situation

The endpoint returns this structure:

{"clubs":
    [
        {
           "url":"https://api.chess.com/pub/club/open-discussion",
           "joined":1468775412,
           "last_activity":1509213591
        }
     ]
}

08/16/2018 First step

We will add the "@id" field and a new "web_url" field. In this case, "url" will the same as "@id". In this phase you are encouraged to switch from "url" to "@id".

In this phase, we will also add a "name" field that will display the Club's name.

{"clubs":
    [
        {
            "@id":"https://api.chess.com/pub/club/open-discussion",
            "url":"https://api.chess.com/pub/club/open-discussion",
            "web_url":"https://www.chess.com/club/open-discussion",
            "name":"Open discussion",
            "joined":1468775412,
            "last_activity":1509213591
        }
     ]
}

09/21/2018 Second step

After one month from first step we will update "url" to be the same as "web_url".

{"clubs":
    [
        {
            "@id":"https://api.chess.com/pub/club/open-discussion",
            "url":"https://www.chess.com/club/open-discussion",
            "web_url":"https://www.chess.com/club/open-discussion",
            "name":"Open discussion",
            "joined":1468775412,
            "last_activity":1509213591
        }
     ]
}

10/22/2018 Third step

After one month from second step we will drop "web_url".

{"clubs":
    [
        {
            "@id":"https://api.chess.com/pub/club/open-discussion",
            "url":"https://www.chess.com/club/open-discussion",
            "name":"Open discussion",
            "joined":1468775412,
            "last_activity":1509213591
        }
     ]
}

We hope that these steps will help you to have a smooth transition to new standard.

More News

Breaking change: Club members' endpoint

Breaking change: Club members' endpoint

Published-Data API

Published-Data API