Problem with 'Servers' request

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

Moderator: NADEO

Post Reply
User avatar
Neon
Posts: 1
Joined: 15 Aug 2015, 15:41

Problem with 'Servers' request

Post by Neon » 10 Mar 2016, 16:42

Hello,
i'm working on new website with Web Services and i have some problems with it. I'm trying request more than 100 servers but i can't. It give me an error with Bad Request. "100 works and 101 or more isn't working" I have got same problem on https://ws.maniaplanet.com. Can you help me resolve this? Thank you.

Code: Select all

$service = new \Maniaplanet\WebServices\Servers($user, $pass);
$list = $service->getFilteredList(
        array(
            'length'=>101 
            )
        );
Fatal error: Uncaught exception 'Maniaplanet\WebServices\Exception' with message 'Bad Request' in C:\XAMPP\htdocs\ServerStatus\Status\include\main\libraries\Maniaplanet\WebServices\HTTPClient.php:369
Last edited by TMarc on 10 Mar 2016, 20:20, edited 1 time in total.
Reason: use code for code ;)

zocka
Posts: 194
Joined: 15 Jun 2010, 17:56

Re: Problem with 'Servers' request

Post by zocka » 11 Mar 2016, 11:38

As I don't find it documented anywhere, I can only assume they sat a length limit of 100 (as some other endpoints are throwing an error for greater length values as well).
It seems you have to send multiple requests with fitting offset values and maybe think whether you really need so much data in one go or if some matching pagination would be benefitial.
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka

Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 2 guests