Page 1 of 1
SDK V1.1, October 28th, 2011
Posted: 28 Oct 2011, 15:43
by gouxim
Re: SDK V1.1, October 28th, 2011
Posted: 28 Oct 2011, 16:20
by TheM
gouxim wrote:Have fun with the rankings methods

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 }
Re: SDK V1.1, October 28th, 2011
Posted: 28 Oct 2011, 16:28
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.
Re: SDK V1.1, October 28th, 2011
Posted: 28 Oct 2011, 16:32
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

Thanks ^^
Re: SDK V1.1, October 28th, 2011
Posted: 30 Oct 2011, 10:34
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 ^^)
Re: SDK V1.1, October 28th, 2011
Posted: 31 Oct 2011, 13:30
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.
Re: SDK V1.1, October 28th, 2011
Posted: 31 Oct 2011, 22:52
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
