Hi @ all,
After months of inactivity, I will have time to develop the tm2 version of tm-ladder.com. In parallel, I will migrate the tmf section from the old depreciated API to trackmania web service.
Before coding the website, I have some questions about the web servicies:
- what is the update frequency of data for tmf and for tm2 (I could find several rate on the forum). In the old API we had in all responses, the timestamp of the last update on Nadeo's servers thus, I could synchronise my cache with nadeo's one. How to know when Nadeo's cache is updated without this timestamp ? If both cache are not synchronised, some players may appears twice in the global ladder and others can not appear.
- Is there an equivalent of pubGetPlayerAllInfosById of the old API in the trackmania ws ? To display the complete account of a player (nick, ladder on all environments, tags, ...), only 1 request was needed. With the ws 9 requests are needed at least for the same result (8 requests are necessary for ladder information and 1 for tags).
- Is in the ws (trackmania and maniaplanet) an equivalent of prv* functions ? For example, getBudies method doesn't give as many information than prvGetPlayerBuddiesLadderMultiPlayers.
with no doubt, I will have others questions,
Thanks for your answer,
Fabien (smurf), tm-ladder.com
various question about ws API
Moderator: NADEO
Re: various question about ws API
First of all, a quick note for people migrating from the old API to the TMF/MP Web Services. It may seem poorer at first sight, but the philosophy has changed ; the old API was accessed by only a few people, so the services were very specific and the information one could access was sometimes quite sensitive. All in all, it was lot of work for us and only a few selected people could use it. The goal of the TMF/MP Web Services was to provide a higlhy accessible API, with simple services, easy-to-use SDK, simple procedure to get credentials, etc. Hence some of the limitations that were introduced with the API. In any case, don't hesitate to make suggestions on what you'd like to see!
Also bear in mind the TMF WS api is not updated that much ; we obviously focus a lot on ManiaPlanet right now.
Also bear in mind the TMF WS api is not updated that much ; we obviously focus a lot on ManiaPlanet right now.
It depends on the data. For players, it is 1 hour. For rankings, it is 24 hours (actually we cache the data for 1 hour on our side, but the rankings DB is updated once a day). FYI we don't even know internally when the data is cleared from cache ; your system should actually be designed to handle this.schtroumf wrote:what is the update frequency of data for tmf and for tm2 (I could find several rate on the forum). In the old API we had in all responses, the timestamp of the last update on Nadeo's servers thus, I could synchronise my cache with nadeo's one. How to know when Nadeo's cache is updated without this timestamp ?
Why do you say that? Do you have an example?schtroumf wrote:If both cache are not synchronised, some players may appears twice in the global ladder and others can not appear.
You need to use ManiaConnect (called OAuth2 in TMF WS) to retrieve personal information, but you'll need the user's permission to do that (see http://code.google.com/p/maniaplanet-ws ... niaConnect).schtroumf wrote:Is there an equivalent of pubGetPlayerAllInfosById of the old API in the trackmania ws ?
There is not. You need to either do all the requests at once, or split the information on several pages.schtroumf wrote:Is there an equivalent of pubGetPlayerAllInfosById of the old API in the trackmania ws ?
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 

Re: various question about ws API
Great. When you do, please address two shortcomings:schtroumf wrote:After months of inactivity, I will have time to develop the tm2 version of tm-ladder.com. In parallel, I will migrate the tmf section from the old depreciated API to trackmania web service.
- all-numeric logins should work and not be taken as some internal ID.
E.g. compare http://www.xaseco.org/metastats.php?tmf=4567457454 with http://en.tm-ladder.com/4567457454_rech.php (error)
or http://www.xaseco.org/metastats.php?tmf=1337331 with http://en.tm-ladder.com/1337331_rech.php (wrong player) - in the account info section, display the login too -- now it is only available as part of the page URL.

Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
-
- Posts: 22
- Joined: 10 Jan 2011, 18:31
- Manialink: ladder exemple
- Location: Région bordelaise
- Contact:
Re: various question about ws API
I made a simple example of mis-synchronisation with the server where a player appears twice and one disappears.
At T0 : cache of the website is empty.
At T1 : user ask ladder 1 to 3 on the website -> ask on nadeo's server, update cache, display ladder
At T2 : user ask ladder 4 to 6 on the website -> ask on nadeo's server, update cache, display ladder
At T3 : User ask ladder 1 to 6 -> doesn't ask on nadeo's server and take data in cache, display ladder
Without server update :

All is OK
With a server update between T1 and T2 (player3 loose 1 position, player4 win 1 position)

At T3, player4 doesn't appear anymore in the result and player3 is duplicated with his old and new position.
At T0 : cache of the website is empty.
At T1 : user ask ladder 1 to 3 on the website -> ask on nadeo's server, update cache, display ladder
At T2 : user ask ladder 4 to 6 on the website -> ask on nadeo's server, update cache, display ladder
At T3 : User ask ladder 1 to 6 -> doesn't ask on nadeo's server and take data in cache, display ladder
Without server update :

All is OK
With a server update between T1 and T2 (player3 loose 1 position, player4 win 1 position)

At T3, player4 doesn't appear anymore in the result and player3 is duplicated with his old and new position.
Who is online
Users browsing this forum: Semrush [Bot] and 1 guest