API Update Interval
Moderators: Forum Moderators, Active DMs
-
- Arelith Silver Supporter
- Posts: 688
- Joined: Sat Nov 15, 2014 4:32 pm
- Location: Matrix, @bullish0576:mozilla.org
API Update Interval
Is there any preferred interval to how often we're allowed to request new information from the API?
I've currently set up a script that requests new JSON every 5 seconds.
Can I go lower? I'd like something along the lines of 1-2 seconds, but would that be too taxing?
If 5 seconds is still too low, how much should I increase the interval?
I've currently set up a script that requests new JSON every 5 seconds.
Can I go lower? I'd like something along the lines of 1-2 seconds, but would that be too taxing?
If 5 seconds is still too low, how much should I increase the interval?
-
- Posts: 649
- Joined: Mon Sep 08, 2014 1:46 am
- Location: 44th most violent city in the world.
Re: API Update Interval
i cant be the only one who has no idea what those acronyms mean
-
- Arelith Silver Supporter
- Posts: 688
- Joined: Sat Nov 15, 2014 4:32 pm
- Location: Matrix, @bullish0576:mozilla.org
Re: API Update Interval
The API just gives information about the server - online players, server status, amount of members and such. Available in both XML and JSON.
http://portal.arelith.com/api/json for JSON, and ...
http://portal.arelith.com/api/xml for XML.
Add /server or /server/state to get more information from the API, than just the directive.
I believe the Portal uses the API as well, seeing that it uses most if not all information from it.
(And that's also the directory for the API, so probably yes.)
http://portal.arelith.com/api/json for JSON, and ...
http://portal.arelith.com/api/xml for XML.
Add /server or /server/state to get more information from the API, than just the directive.
I believe the Portal uses the API as well, seeing that it uses most if not all information from it.
(And that's also the directory for the API, so probably yes.)
-
- Arelith Supporter
- Posts: 188
- Joined: Mon Sep 08, 2014 12:41 pm
Re: API Update Interval
I am a noob I guess. Why on earth would you need to have server info updated that often?
RED GANOT wrote:STEP 1: Stop being scared of conflict.
-
- Posts: 800
- Joined: Thu Sep 11, 2014 5:25 pm
Re: API Update Interval
JSON, API ORLY? FRG, PHP OMG? TY! K THX BI.
(SRRY, JK.)
(SRRY, JK.)
-
- Arelith Supporter
- Posts: 167
- Joined: Tue Sep 30, 2014 9:12 pm
Re: API Update Interval
Toooooo many acronyms, my brain hurts.
-
- Arelith Silver Supporter
- Posts: 688
- Joined: Sat Nov 15, 2014 4:32 pm
- Location: Matrix, @bullish0576:mozilla.org
Re: API Update Interval
Getting last seen dates and whether or not players are online.What_Evil_Lurks wrote:I am a noob I guess. Why on earth would you need to have server info updated that often?
* The API does not deliver last seen dates, and doesn't have offline users - therefore I cache every player that pops up online, and track their "lastseen" as long as they're online. Gives a pretty decent estimate on when they've been last online, if they disappear from the API's list.
Beep boop.