SDK V1.1, October 28th, 2011

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

Moderator: NADEO

Locked
User avatar
gouxim
Nadeo
Nadeo
Posts: 1188
Joined: 14 Jun 2010, 17:20

SDK V1.1, October 28th, 2011

Post by gouxim »

New version is available !

Download is here: http://code.google.com/p/maniaplanet-ws ... loads/list
Changelog is here: http://code.google.com/p/maniaplanet-ws ... /Changelog

Have fun with the rankings methods :yes:
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
TheM
Posts: 1446
Joined: 15 Jun 2010, 14:30
Location: Uden, Noord-Brabant, Netherlands
Contact:

Re: SDK V1.1, October 28th, 2011

Post by TheM »

gouxim wrote:Have fun with the rankings methods :yes:
Well, it says I'm not authorised to see them...

Code: Select all

object(Maniaplanet\WebServices\Exception)#7 (9) { ["HTTPStatusCode":protected]=> int(401) ["HTTPStatusMessage":protected]=> string(12) "Unauthorized" ["message":protected]=> string(0) "" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(99) "/home/deb24729n3/domains/mlepp.com/public_html/esl/libraries/Maniaplanet/WebServices/HTTPClient.php" ["line":protected]=> int(332) ["trace":"Exception":private]=> array(2) { [0]=> array(6) { ["file"]=> string(115) "/home/deb24729n3/domains/mlepp.com/public_html/esl/libraries/Maniaplanet/WebServices/Canyon/MultiplayerRankings.php" ["line"]=> int(21) ["function"]=> string(7) "execute" ["class"]=> string(34) "Maniaplanet\WebServices\HTTPClient" ["type"]=> string(2) "->" ["args"]=> array(3) { [0]=> string(3) "GET" [1]=> string(39) "/canyon/rankings/multiplayer/player/%s/" [2]=> array(1) { [0]=> string(4) "them" } } } [1]=> array(6) { ["file"]=> string(62) "/home/deb24729n3/domains/mlepp.com/public_html/esl/test_mp.php" ["line"]=> int(38) ["function"]=> string(9) "getPlayer" ["class"]=> string(50) "Maniaplanet\WebServices\Canyon\MultiplayerRankings" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(4) "them" } } } ["previous":"Exception":private]=> NULL } 
Global moderator | Dutch moderator | Laddermoderator | ManiaWiki moderator
Server Manager/webmaster of Smurfen.net, join us on Canyon, Valley and Royal!
ESL (Game) Staff Head for TrackMania (Stadium, Canyon and Valley).
User avatar
gouxim
Nadeo
Nadeo
Posts: 1188
Joined: 14 Jun 2010, 17:20

Re: SDK V1.1, October 28th, 2011

Post by gouxim »

HTTP 401 Unauthorized means that your credentials are wrong (bad password?).
HTTP 403 Forbidden would have meant that you don't have the rights.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
TheM
Posts: 1446
Joined: 15 Jun 2010, 14:30
Location: Uden, Noord-Brabant, Netherlands
Contact:

Re: SDK V1.1, October 28th, 2011

Post by TheM »

gouxim wrote:HTTP 401 Unauthorized means that your credentials are wrong (bad password?).
HTTP 403 Forbidden would have meant that you don't have the rights.
Oeh, found the mistake :P Thanks ^^
Global moderator | Dutch moderator | Laddermoderator | ManiaWiki moderator
Server Manager/webmaster of Smurfen.net, join us on Canyon, Valley and Royal!
ESL (Game) Staff Head for TrackMania (Stadium, Canyon and Valley).
User avatar
m4rcel
Posts: 653
Joined: 15 Jun 2010, 11:12
Contact:

Re: SDK V1.1, October 28th, 2011

Post by m4rcel »

I updated the service return types documentation few moments ago, and I noticed some points, which I want to name and ask if they are intended as they currently are:
  • MP\WS\Canyon\SoloRankings: Return values of the methods getWorld() and getZone() contain a field "environment" with the value "Canyon", but getChallengeWorld() and getChallengeZone() don't.
  • MP\WS\Canyon\MultiplayerRankings->getPlayer() returns the points of all zones the player is in (World, Germany, Thuringia and Erfurt in my case), but MP\WS\Canyon\SoloRankings->getPlayer() only holds World rankings in the ranks field. (I guess there are no detailled information for the other zones, as it was in TMWS, but I want to have named it, too ;))
  • MP\WS\Canyon\SoloRankings and MultiplayerRankings: I am not sure about the naming of the methods getZone() and getChallengeZone() or espacially about the $zone parameter: It does not indicate, that the zone-path is expected as value, not the zone-id. (But maybe this only confused me because I worked with the MP\WS\Zones-class few seconds before, where get() expects the ID and getByPath() the path)
  • MP\WS\ManiaHome: The deprecated class postNotification() returned the result of the POST request, the new methods don't. Am I correct, that the Notification has been successfully posted if no Exception has been raised, and vice versa? (This is only for my understanding ^^)
ImageImage
Image
User avatar
gouxim
Nadeo
Nadeo
Posts: 1188
Joined: 14 Jun 2010, 17:20

Re: SDK V1.1, October 28th, 2011

Post by gouxim »

m4rcel wrote:MP\WS\Canyon\SoloRankings: Return values of the methods getWorld() and getZone() contain a field "environment" with the value "Canyon", but getChallengeWorld() and getChallengeZone() don't.
Fixed.
m4rcel wrote:MP\WS\Canyon\MultiplayerRankings->getPlayer() returns the points of all zones the player is in (World, Germany, Thuringia and Erfurt in my case), but MP\WS\Canyon\SoloRankings->getPlayer() only holds World rankings in the ranks field. (I guess there are no detailled information for the other zones, as it was in TMWS, but I want to have named it, too ;))
Yes indeed, it's as in TMWS.
m4rcel wrote:MP\WS\Canyon\SoloRankings and MultiplayerRankings: I am not sure about the naming of the methods getZone() and getChallengeZone() or espacially about the $zone parameter: It does not indicate, that the zone-path is expected as value, not the zone-id. (But maybe this only confused me because I worked with the MP\WS\Zones-class few seconds before, where get() expects the ID and getByPath() the path)
I'm not sure I understand: in those methods the parameter is called $path which is pretty straightforward (eg. http://code.google.com/p/maniaplanet-ws ... ngs.php#29 )
m4rcel wrote:MP\WS\ManiaHome: The deprecated class postNotification() returned the result of the POST request, the new methods don't. Am I correct, that the Notification has been successfully posted if no Exception has been raised, and vice versa? (This is only for my understanding ^^)
I added the "return" in the trunk. But it's only for consistency since those methods never return anything. Indeed, if no exception is thrown that means the notification was successfully posted.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
m4rcel
Posts: 653
Joined: 15 Jun 2010, 11:12
Contact:

Re: SDK V1.1, October 28th, 2011

Post by m4rcel »

gouxim wrote:
m4rcel wrote:MP\WS\Canyon\SoloRankings and MultiplayerRankings: I am not sure about the naming of the methods getZone() and getChallengeZone() or espacially about the $zone parameter: It does not indicate, that the zone-path is expected as value, not the zone-id. (But maybe this only confused me because I worked with the MP\WS\Zones-class few seconds before, where get() expects the ID and getByPath() the path)
I'm not sure I understand: in those methods the parameter is called $path which is pretty straightforward (eg. http://code.google.com/p/maniaplanet-ws ... ngs.php#29 )
My bad, I remembered somehow that these parameters were named $zone. So, uhm... ignore this point of my list ^^


Thank you for your answer :)
ImageImage
Image
Locked

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest