Page 1 of 1

Ws/Links broken

Posted: 17 Jul 2014, 15:55
by w1lla
Hi,

When trying to post a message for a team, i get the following issue:

Code: Select all

https://ws.maniaplanet.com/teams/7148/links/ ; Route not found "/teams/7148/links

Code: Select all

Error! HTTP Response: 400 Bad Request API Response: Invalid object property "0" (400)
Source code:

Code: Select all

<?php
/**
 * Maniaplanet Web Services SDK for PHP
 *
 * @copyright   Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
 * @license     http://www.gnu.org/licenses/lgpl.html LGPL License 3
 * @author      $Author: maximeraoust $:
 * @version     $Revision: 2 $:
 * @date        $Date: 2011-09-08 18:03:11 +0200 (Thu, 08 Sep 2011) $:
 */
require_once __DIR__.'/libraries/autoload.php';

try
{
$servers = new Maniaplanet\WebServices\Links('','', '');
$url="http://maniamatch.maniaplanet.com/club-link?team=68facfc716c19445c5671bf1376b2b6a-7148";
$requred_string = substr(strrchr($url, "-"), 1);
//echo $requred_string;
$teamId = $requred_string;
$link = "http://lynx.tmfserver.com";
$name = "Website";
$category = Maniaplanet\WebServices\Links::CATEGORY_URL;
$isFeatured = false;
$list = $servers->createForTeam($teamId, $link, $name, $category, $isFeatured);
echo $list;
var_dump($list);
}
catch(\Maniaplanet\WebServices\Exception $e)
{
	echo "Error!\n";
	printf('HTTP Response: %d %s', $e->getHTTPStatusCode(),
		$e->getHTTPStatusMessage());
	echo "\n";
	printf('API Response: %s (%d)', $e->getMessage(), $e->getCode());
	echo "\n";
}
echo "\n";
?>
Same might also happen for Create for Competition.

Re: Ws/Links broken

Posted: 28 Oct 2014, 19:01
by w1lla
Fixed it on github.

No need to look after in your priority list to make a fix for it.

Re: Ws/Links broken

Posted: 18 Nov 2014, 10:25
by gouxim