Create your own server list

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

Moderator: NADEO

User avatar
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Create your own server list

Post 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 :)
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    jonthekiller
    Translator
    Translator
    Posts: 4702
    Joined: 15 Jun 2010, 11:07
    Location: In Maniaplanet Alpha
    Contact:

    Re: Create your own server list

    Post 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".
    Image
    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2472
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Create your own server list

    Post 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?
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks
      User avatar
      jonthekiller
      Translator
      Translator
      Posts: 4702
      Joined: 15 Jun 2010, 11:07
      Location: In Maniaplanet Alpha
      Contact:

      Re: Create your own server list

      Post 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.
      Image
      User avatar
      steeffeen
      Translator
      Translator
      Posts: 2472
      Joined: 14 Oct 2012, 16:22
      Location: Germany

      Re: Create your own server list

      Post 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
        Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

        ManiaControl, FancyManiaLinks
        User avatar
        jonthekiller
        Translator
        Translator
        Posts: 4702
        Joined: 15 Jun 2010, 11:07
        Location: In Maniaplanet Alpha
        Contact:

        Re: Create your own server list

        Post 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.
        Image
        User avatar
        magnetik
        Nadeo
        Nadeo
        Posts: 1678
        Joined: 01 Feb 2012, 19:13
        Location: Bordeaux
        Contact:

        Re: Create your own server list

        Post 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.
        ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
        User avatar
        jonthekiller
        Translator
        Translator
        Posts: 4702
        Joined: 15 Jun 2010, 11:07
        Location: In Maniaplanet Alpha
        Contact:

        Re: Create your own server list

        Post 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.
        Image
        User avatar
        steeffeen
        Translator
        Translator
        Posts: 2472
        Joined: 14 Oct 2012, 16:22
        Location: Germany

        Re: Create your own server list

        Post 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
          Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

          ManiaControl, FancyManiaLinks
          Post Reply

          Return to “Maniaplanet Web Services”

          Who is online

          Users browsing this forum: No registered users and 2 guests