MP3: API/SDK Version 5.x

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

Moderator: NADEO

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

MP3: API/SDK Version 5.x

Post by magnetik »

Hi,

A new version of the API and SDK has just been released.

You can download it here.

API Changes
  • /dedicated/ is moved to /servers/
    • /servers/:login/favorited/ has been added to seen how many times a server has been favorited
    • /server/:login/players/ get players currently on the server
    • GET /servers/ get a list of servers it can be filtered with title, environment, gameMode, etc.
    • In object returned, description, scriptName, scriptVersion and scriptTeam has been added.
  • NEW: /teams/
    • /teams/:id/ : return info about the team (name, description)
    • /teams/:id/players/ : return players of the team
    • /teams/:id/admins/ : return admins of the team
  • NEW : /players/:login/teams
  • NEW: /zone/id/:id/population/ : number of players in the zone
  • Storm rankings are available with the same architecture as Canyon’s
    • /storm/rankings/multiplayer/player/:login/
    • /storm/rankings/multiplayer/zone/?offset=X&length=Y
    • /storm/rankings/multiplayer/zone/%s/?offset=X&length=Y
  • Title’s ranking are available with the following architecture.
    • /titles/rankings/multiplayer/player/%s/?title=ID_STRING
    • /titles/rankings/multiplayer/zone/?title=ID_STRING&offset=X&length=Y
    • /titles/rankings/multiplayer/zone/%s/?title=ID_STRING&offset=X&length=Y
  • New Trust Circle routes
    • /trust/CIRCLE_NAME/karma/PLAYER_LOGIN/ : Get how many times a player has been blacklisted and whitelisted within a circle
    • /trust/%s/black/ OR /trust/black/ : Get your own blacklist or a shared one
    • /trust/%s/white/ OR /trust/white/ : Get your own whitelist or a shared one
    • POST /trust/black/ : Blacklist a player
    • POST /trust/unblack/ : Unblacklist a player
    • POST /trust/white/ : Whitelist a player
    • POST /trust/unwhite/ : Unwhitelist a player
  • NEW GET /report-abuse/list/:login/ get report abuses on this server login
Maniaconnect new routes:
  • NEW: /player/teams/
  • NEW: /player/titles/owned/
  • NEW: /player/titles/installed/
  • NEW: /player/dedicated/:serverLogin/reportAbuse/
ID_STRING of current titles are :
  • SMStorm
  • TMCanyon
  • SMStormJoust@nadeolabs
  • SMStormElite@nadeolabs
SDK Changes

Main changes are :
  • Maniaplanet\WebServices\Dedicated.php is moved to Maniaplanet\WebServices\Servers.php
  • NEW getReportAbuses($login): return the list of report abuse created on the given login
  • NEW getFilteredList($filters): return the list of server filtered by the associative array $filters
    • NEW: getFavoritedCount($login) return the number of people who has this server in favorites
  • Maniaplanet\WebServices\Zones.php
    • NEW : getPopulation($id) return the population (in number of players) of a zone
  • NEW: Maniaplanet\WebServices\Teams.php
    • get($id): return infos about the team (name, description)
    • getContracts($id): list of players of the team
    • getAdmins($id): list of admins of the team
  • Maniaplanet\WebServices\Players.php
    • NEW: getContracts($login): return the teams’s contract
  • Maniaplanet\WebServices\Trust.php
    • getKarma($circle, $player) : Get how many times a player has been blacklisted and whitelisted within a circle
    • getBlackList($circle = null) : Get your own blacklist or a shared one
    • getWhiteList($circle = null) : Get your own whitelist or a shared one
    • blackList($player) : Blacklist a player
    • whiteList($player) : WhiteList a player
    • unBlackList($player) : unBlacklist a player
    • unWhiteList($player) : unWhiteList a player
Rankings has completely changed. Each environment are in separated files, and an additional file is available for titles. Moreover, multiplayer and solo rankings are now in the same files.
The function are the same as in previous version.
  • Maniaplanet\WebServices\Rankings\Canyon.php
    • getMultiplayerPlayer($login)
    • getMultiplayerWorld($offset, $length)
    • getSoloWorld($login)
    • …
  • Maniaplanet\WebServices\Rankings\Storm.php
  • Only multiplayer function are available
In ManiaConnect :
  • NEW: getTeams() return the player’s list of team’s contract (scope teams)
  • NEW: getOwnedTitles() return the titles owned by the player (scope titles)
  • NEW: getInstalledTitles() return the titles installed by the player (scope titles)
  • NEW: getReportAbuses($serverLogin) return the list of report abuses created on the server
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: API/SDK 3.0.1

Post by gouxim »

Updated with 3.0.1
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: API/SDK 3.0.2

Post by magnetik »

Updated with 3.0.2
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

Re: API/SDK 3.0.3

Post by Xymph »

magnetik wrote: A new version of the API and SDK has just been released.

Complete changelog here.
After the 3.0.2 and 3.0.3 releases, it's not so complete anymore. ;)
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
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: API/SDK 3.0.3

Post by magnetik »

3.0.4 has been pushed
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: API/SDK 3.0.4

Post by magnetik »

3.1.0 has been pushed.

It contains brand new ManiaHome & ManiaFlash APIs (the old maniahome API is still there for backwards compatibility).
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
farfa
Nadeo
Nadeo
Posts: 585
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: API/SDK Version 3.x

Post by farfa »

3.2.0 has been pushed.
It contains report abuses for a server. API username owner and server owner must be the same.
Also known as: satanasdiabolo
farfa
Nadeo
Nadeo
Posts: 585
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: API/SDK Version 3.x

Post by farfa »

3.3 has been pushed
New path added to ManiaConnect to get report abuse of a server owned by the authenticated player
New path added to servers to get the server list. To filter this list you have to provide an associative array to the method Maniaplanet\WebServices\Servers::getFilteredList($array)
Here is the key, type and description of the value you can provide. To filter the list use any of these keys.
  • title int The environment name, at the moment only Storm or Canyon
  • title string The Title idString for example SMStormElite@nadeolabs
  • playersMin int Minimum number of player connected on the server
  • playersMax int Maximum number of player connected on the server
  • hideFull bool If true, full servers will not be displayed
  • visibility string It can take one of those 3 values: all, public or private
  • zone string The path to a zone, for example: World|France. It will display every server in France subzones
  • mode mixed It can be one of class constant, or directly the game mode name itself (TimeAttack, Melee, ...)
  • offset int The offset in the list where the results will start
  • length int Number of elements returned
Also known as: satanasdiabolo
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: API/SDK Version 3.x

Post by The_Big_Boo »

3.4 has been pushed.

It includes new APIs for competitions and teams.
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: API/SDK Version 3.x

Post by The_Big_Boo »

3.5 has been pushed

Changelog:
  • Adding Stadium rankings
  • Adding Royal rankings
  • Adding method to delete a team in a competition
  • Adding Links category
  • Adding mediaUrl to ManiaFlash
  • Fixed server notifications
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310
Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest