Ws/Links broken

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

Moderator: NADEO

Post Reply
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Ws/Links broken

Post 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.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: Ws/Links broken

Post by w1lla »

Fixed it on github.

No need to look after in your priority list to make a fix for it.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: Ws/Links broken

Post by gouxim »

Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest