Page 2 of 3

Re: Create your own server list

Posted: 23 Apr 2013, 03:13
by steeffeen
weird things happening to me:

Code: Select all

$list = $server->getFilteredList(array("environment"=>"Storm", "mode"=>"Siege"));
Service wrote:HTTP Response: 400 Bad Request
API Response: Invalid login "" (400)
invalid login? wtf?

why needs the title to be specified? :x
the environment key is useless if you need to specify the title anyways :roll:

Code: Select all

$list = $server->getFilteredList(array("title"=>"SMStorm", "length"=>60));
Service wrote:HTTP Response: 400 Bad Request
API Response: Bad Request (400)
i see why there is a limit of result items, but with the current behavior i need 4! requests to get a list of servers running a custom game mode... please let us filter by specific custom game modes as well, not only with -3...
4 requests may not be THAT horrible, but imagine shootmania may become bigger in the future and there are even more custom servers running :)

Re: Create your own server list

Posted: 19 May 2013, 13:33
by jonthekiller
Is it possible to add an order function like by the number of players or all servers in SMStorm but by gamemode without make 1 request by gamemode?

What is the limit for the length value? I tried 90 and sometimes it works, sometimes I have Bad Request.

And "mode" is replaced by "scriptName".

Re: Create your own server list

Posted: 19 May 2013, 13:43
by steeffeen
jonthekiller wrote:Is it possible to add an order function like by the number of players or all servers in SMStorm but by gamemode without make 1 request by gamemode?
can't you just sort the result on your end? would be easier if you ask me
jonthekiller wrote:What is the limit for the length value? I tried 90 and sometimes it works, sometimes I have Bad Request.
the limit is 50, i can't really believe that 90 worked for you ^^
jonthekiller wrote:And "mode" is replaced by "scriptName".
what do you mean with that?

Re: Create your own server list

Posted: 19 May 2013, 14:10
by jonthekiller
steeffeen wrote:
jonthekiller wrote:And "mode" is replaced by "scriptName".
what do you mean with that?
Sorry, I mixed two things^^
steeffeen wrote:
jonthekiller wrote:Is it possible to add an order function like by the number of players or all servers in SMStorm but by gamemode without make 1 request by gamemode?
can't you just sort the result on your end? would be easier if you ask me
I would like to make an alternative browser because I find the current has a lack of features like order by number of players and not by the "level" of players, the search without formatage...

In this case, I need to make several request to have enough servers (I think about the future and when we will have more than 50 servers with players). I think it can reduce the number of requests in some case. I can make without for the moment if isn't in the todo to propose this.
steeffeen wrote:
jonthekiller wrote:What is the limit for the length value? I tried 90 and sometimes it works, sometimes I have Bad Request.
the limit is 50, i can't really believe that 90 worked for you ^^
It worked one time for me. Maybe good to give the number in the documentation.

Re: Create your own server list

Posted: 19 May 2013, 14:20
by steeffeen
jonthekiller wrote:In this case, I need to make several request to have enough servers (I think about the future and when we will have more than 50 servers with players). I think it can reduce the number of requests in some case. I can make without for the moment if isn't in the todo to propose this.
you need several requests anyways, don't you?
or do you only want to display not-empty servers?

and making more than one request isn't such a big deal server-sided, you can make several requests at once without big problems

for example if you want to display all servers for Obstacle:
- get ALL custom mode servers
- filter and sort

like that: http://www.team-devota.com/steeffeen/ma ... /?obstacle

Re: Create your own server list

Posted: 19 May 2013, 15:15
by jonthekiller
I want to limit the requests, I don't know how many users and their utilizations for the moment. For the list of servers, I can cache the list with a reset each 2 minutes maybe. After for the details of each servers, it isn't useful to use the cache at the beginning, maybe after if many users use it.
I see I can give a minimal number of players in my request

If you count the number of titles, the number of pages, details, and maybe other things after, each optimization can be useful I think.

I will make my browser with this limitation and see the result.

Re: Create your own server list

Posted: 21 May 2013, 11:16
by magnetik
I've increased the limit to 100 results on the '/server/' endpoint.

Have you tried the parameter "environment=Storm" on this endpoint?

Ordering is not available at the moment. I've added it to my todo list.

Re: Create your own server list

Posted: 21 May 2013, 11:18
by kremsy
Thank you very much magnetik!
Is there any possability that you can Increase the limit of the Result in the Players Ranking also?
Because the server object is way bigger than the Ranking one, so I think that should be no problem :).

Correct me if I am wrong :thumbsup:

jonthekiller, why you need ordering, you can easily order the lists yourself in your code :).

Re: Create your own server list

Posted: 21 May 2013, 12:27
by jonthekiller
kremsy wrote:jonthekiller, why you need ordering, you can easily order the lists yourself in your code :).
Yes but maybe not optimized to stock all results (all pages) and after order. It can be enough if we don't have a huge utilization.

It's not possible to have all servers in an environment without give a title? I have "Invalid login" error message.

Re: Create your own server list

Posted: 21 May 2013, 12:54
by steeffeen
jonthekiller wrote:It's not possible to have all servers in an environment without give a title? I have "Invalid login" error message.
yep i've encountered the same problem, my post is at the top of this page :D
http://forum.maniaplanet.com/viewtopic. ... 68#p161502