Things which are missing in the API.

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

Moderator: NADEO

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Things which are missing in the API.

Post by kremsy » 01 May 2013, 15:30

Is there any possibility that you create a Method similar to this:

Code: Select all

	/**
	 * Return online players for the given server
	 * @param string $login
	 * @return object[]
	 * @throws Exception
	 */
	function getOnlinePlayers($login)
	{
		if(!$login)
		{
			throw new Exception('Invalid login');
		}
		return $this->execute('GET', '/servers/%s/players/', array($login));
	}
Which can be used for more than one servers at once, just with an array of logins, (100 would be best, 50 or 25 would be also fine :)).

Another solution would be a Method which returns a list of Online Players like the getOnlinePlayers list but with an extra field where the serverId stands.

I would really appreciate that :).


Best regards,
Lukas
Last edited by kremsy on 01 May 2013, 17:57, edited 3 times in total.
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Things which are missing in the API.

Post by kremsy » 01 May 2013, 17:08

Is it possible that you return \Maniaplanet\WebServices\Servers instead of the map-names of the next 15 maps, the UID of these maps?

The next thing is that you don't get anything where you can see if the server is a relay server or not, so I suggest that you set isLadder to 0 or make a isRelay flag.
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

User avatar
magnetik
Nadeo
Nadeo
Posts: 1670
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: Things which are missing in the API.

Post by magnetik » 09 May 2013, 22:06

- About all request asking for a "batch" version taking hundreds of data in input: it won't exist. For a quite simple reason: calling /servers/online/?login1=foo&login2=bar&login3 (with N parameters) takes the same amount of ressources on our architecture than calling N times /servers/foo/online/ and /servers/bar/online/ etc. (Yep network usage is lower with batch request but that's not what is costly on our architecture)
- UID of current server maps: we don't have them
- Information about relay server is on my todo list
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!

User avatar
magnetik
Nadeo
Nadeo
Posts: 1670
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: Things which are missing in the API.

Post by magnetik » 15 May 2013, 14:58

I've added the relay information. Player count is automatically corrected

For instance:

Code: Select all

Object
(
    [login] => adatm2_relay
    [owner] => ameliesachs_tm2
    [serverName] => $w$o$i$3f3 ĄÐĄ* TV 1
    [description] => Hosted by www.valid.cz
[...]
    [relayOf] => adatm2_match
[...]
)
[edit] Environment filtering should be working too
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!

User avatar
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Things which are missing in the API.

Post by steeffeen » 15 May 2013, 15:02

wow that's looking promising!
good job :thumbsup:
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

    kremsy
    Posts: 1723
    Joined: 21 Jul 2011, 09:51

    Re: Things which are missing in the API.

    Post by kremsy » 15 May 2013, 21:41

    Thank you!
    Lukas alias Kremsy, Developer of:
    ManiaControl: http://www.maniacontrol.com
    ParagonLeague: http://league.paragon-esports.com
    MPAseco: http://mpaseco.org
    ManiaViewer: http://www.maniaviewer.com

    kremsy
    Posts: 1723
    Joined: 21 Jul 2011, 09:51

    Re: Things which are missing in the API.

    Post by kremsy » 15 May 2013, 21:47

    magnetik wrote:
    kremsy wrote: Maniaplanet\WebServices\Rankings
    You get a path of the Players $player->player->path but its only World|Europe / World|North America, there should be the complete path until the city where the player comes from. and the $player->player->idZone is also only a id for the Continent.
    I'm not sure to know which function you are talking about.
    If you use getMultiplayerPlayer($login) you will have an array with the ranks in each zone: http://pastebin.com/2wYvxDG4
    I talk about the getMultiplayerWorld($title, $offset, $length); It would be nice if it can return the valid idZone of the Player, or the valid Path, it only returns information for the players continent.

    Code: Select all

                        [player] => stdClass Object
                            (
                                [id] => 1192
                                [login] => dawid-dada
                                [nickname] => $i$fff$o»$09Fda$08Ewi$07Ddツ
                                [path] => World|Europe
                                [idZone] => 118644
                            )
    Shoulde be for example (but it would be enough if the idZone is the id of the player's zone:

    Code: Select all

                        [player] => stdClass Object
                            (
                                [id] => 1192
                                [login] => dawid-dada
                                [nickname] => $i$fff$o»$09Fda$08Ewi$07Ddツ
                                [path] => World|Europe|Poland|Podkarpackie
                                [idZone] => 7122
                            )
    Lukas alias Kremsy, Developer of:
    ManiaControl: http://www.maniacontrol.com
    ParagonLeague: http://league.paragon-esports.com
    MPAseco: http://mpaseco.org
    ManiaViewer: http://www.maniaviewer.com

    Post Reply

    Return to “Maniaplanet Web Services”

    Who is online

    Users browsing this forum: No registered users and 2 guests