[beta]SDK v1.3

Maniaplanet public API, ManiaConnect system and the open source PHP SDK.

Moderator: NADEO

User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

Re: [beta]SDK v1.3

Post by Xymph »

I've been toying around with this SDK, and it looks like there's a bug in Maniaplanet/WebServices/Canyon/SoloRankings.php:
The methods that accept $offset and $length parameters do not include those in the GET paths, i.e. the paths are missing the query string "?offset=%d&length=%d".

The MultiplayerRankings methods do this correctly.

Not a bug I suppose, but supplying a length > 10 results in error 400 Bad Request, which is kind of disappointing, as it would take a lot of requests to compile a more or less complete ranking. But I presume that's intentional, to prevent overloading the stats server with length=10000 queries. ;)

Nevertheless, is there a way to find the total number of players in a specific zone like the game client shows, without collecting the entire list for that zone 10 entries at a time?
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
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: [beta]SDK v1.3

Post by gouxim »

Thanks for the report. It was indeed a bug and was fixed in the svn.

http://code.google.com/p/maniaplanet-ws ... tail?r=102

For the now the limit is indeed 10. We'll increase it a little bit (maybe 50 or 100).
Nevertheless, is there a way to find the total number of players in a specific zone like the game client shows, without collecting the entire list for that zone 10 entries at a time?
Suggestion noted, we'll think about it.

However if you get a ranking from a zone, you won't actually have the number of players in that zone but only a subset (eg. for Multiplayer you're in the ranking if you played Multi at least once ; in TMF, there's 10M+ accounts registered but only about 4 or 5M in the Multi ranking if i'm not mistaking)
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

Re: [beta]SDK v1.3

Post by Xymph »

gouxim wrote:Thanks for the report. It was indeed a bug and was fixed in the svn.

http://code.google.com/p/maniaplanet-ws ... tail?r=102
Ok, I just went with the latest zip, that was easier. Glad my local fix is the same as yours. :)
gouxim wrote:For the now the limit is indeed 10. We'll increase it a little bit (maybe 50 or 100).
Fine.
gouxim wrote:
Xymph wrote:Nevertheless, is there a way to find the total number of players in a specific zone like the game client shows, without collecting the entire list for that zone 10 entries at a time?
Suggestion noted, we'll think about it.
Thanks. It's not just the TMF/MP game clients that show them, but the old TMN ESWC ladder API also returns total player numbers for both world and nation. So having symmetry with that would be nice as well.
gouxim wrote:However if you get a ranking from a zone, you won't actually have the number of players in that zone but only a subset (eg. for Multiplayer you're in the ranking if you played Multi at least once ; in TMF, there's 10M+ accounts registered but only about 4 or 5M in the Multi ranking if i'm not mistaking)
Close, it's 6.1M. But that's what I'm after, (sub)zones in the game client show ranks and totals relative to those (sub)zones, and it would be logical if the WS can be used to retrieve the same numbers.

Speaking of (sub)zones, the MultiplayerRankings->getPlayer method in the ManiaPlanet WS and the Players->getMultiplayerRanking one in the TMF WS do return the ranks and zone ids/paths down to the lowest zone. But the corresponding SoloRankings->getPlayer and Players->getSoloRanking methods return only the World rank and id/path. Is that a bug, or can the subzones be added to those methods as well? After all, the game client displays the nested zones too.
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
User avatar
m4rcel
Posts: 650
Joined: 15 Jun 2010, 11:12
Contact:

Re: [beta]SDK v1.3

Post by m4rcel »

Xymph wrote:Speaking of (sub)zones, the MultiplayerRankings->getPlayer method in the ManiaPlanet WS and the Players->getMultiplayerRanking one in the TMF WS do return the ranks and zone ids/paths down to the lowest zone. But the corresponding SoloRankings->getPlayer and Players->getSoloRanking methods return only the World rank and id/path. Is that a bug, or can the subzones be added to those methods as well? After all, the game client displays the nested zones too.
I'm not quite sure if I get your post right, but is it the same question as I asked here some time ago? (If so, you have the answer in the linked thread ^^)
ImageImage
Image
User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

Re: [beta]SDK v1.3

Post by Xymph »

m4rcel wrote:
Xymph wrote:Speaking of (sub)zones, the MultiplayerRankings->getPlayer method in the ManiaPlanet WS and the Players->getMultiplayerRanking one in the TMF WS do return the ranks and zone ids/paths down to the lowest zone. But the corresponding SoloRankings->getPlayer and Players->getSoloRanking methods return only the World rank and id/path. Is that a bug, or can the subzones be added to those methods as well? After all, the game client displays the nested zones too.
I'm not quite sure if I get your post right, but is it the same question as I asked here some time ago? (If so, you have the answer in the linked thread ^^)
I didn't search before posting my question (sorry), but yes, that's the same.
I find the answer about different granularities rather strange though, because, again, our reference is the game client which does provide SP rankings for subzones. So why can't the web service?
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
User avatar
kripkee
Posts: 920
Joined: 21 Jun 2010, 14:04

Re: [beta]SDK v1.3

Post by kripkee »

m4rcel wrote: Current Version: 1.2 (10.01.2012)

Maniaplanet\WebServices\Dedicated
  • get($login)
    Returns: object containing the following fields:
    • login: string - The login of the server, equals $login
    • owner: string - The login of the owner of the server
    • serverName: string - The name of the server
    • isOnline: boolean - 1 if the server currently is online, 0 if not
    • ifDedicated: boolean - 1 if this login is a dedicated server login, 0 if it is a player login
    • path: string - The path of the server, zones are seperated with |
    • idZone: int - The ID of the server's zone
Is it possible to add the gamemode/ladder/Number of Player/Spec ?

Cheers Kripke
User avatar
askuri
Posts: 156
Joined: 18 Oct 2011, 15:01
Location: Germany

Re: [beta]SDK v1.3

Post by askuri »

Is the same possible in TMF?
Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest