Go Back   Champions of Regnum > English > General discussion

General discussion Topics related to various aspects of Champions of Regnum

Reply
 
Thread Tools Display Modes
Old 01-24-2014, 10:54 AM   #151
Adrian
NGD·Studios
 
Adrian's Avatar
 
Join Date: May 2007
Location: Wien, Österreich
Posts: 2,859
Adrian will become famous soon enoughAdrian will become famous soon enough
Default

Quote:
Originally Posted by Wi3ld View Post
I generally develop on my laptop before finally pushing it to my staging VPS, then eventually Live. Therefore, initially I don't have a static IP. Do you open the api based on IP allow list?
Yeah, it's a REALLY simple API, not meant to be secure (all information transferred is public, no sensitive data) but only to limit the usage of the database and website resources.

Yes, there's an IP allow list, so you can send me your dynamic one just for a test.
Adrian no ha iniciado sesión   Reply With Quote
Old 01-24-2014, 11:12 AM   #152
Slartibartfast
Master
 
Slartibartfast's Avatar
 
Join Date: Mar 2012
Location: Zagreb / Croatia
Posts: 578
Slartibartfast is on a distinguished road
Default

Quote:
Originally Posted by Wi3ld View Post
I generally develop on my laptop before finally pushing it to my staging VPS, then eventually Live. Therefore, initially I don't have a static IP. Do you open the api based on IP allow list?
I recommend you writting a small proxy which will run on your VPS. Proxy accepts requests from your dev PC, forwards it to NGD's API server and sends response back to your PC. That's few lines of python code.
__________________
Slartibartfast / Slartibartflask / Phartiphukborlz / Slartibarbfast / Blart Versenwald :: The true Goat of Alsius
CoR Sentinel
Slartibartfast no ha iniciado sesión   Reply With Quote
Old 01-24-2014, 01:42 PM   #153
Wi3ld
Master
 
Wi3ld's Avatar
 
Join Date: Apr 2013
Location: Under your bed
Posts: 251
Wi3ld is on a distinguished road
Default

Quote:
Originally Posted by Slartibartfast View Post
I recommend you writting a small proxy which will run on your VPS. Proxy accepts requests from your dev PC, forwards it to NGD's API server and sends response back to your PC. That's few lines of python code.
It's not a massive problem - I'm just glad we've got an API. But it would make more sense to limit the requests to the server instead of an IP allow list.. especially if it's just transmitting information that can be publicly obtained through the website anyway. I might try and hit my ISP up for a static IP in any case. I'm paying them enough :P
__________________
Memoize [Knight]
Wi3ld no ha iniciado sesión   Reply With Quote
Old 01-25-2014, 01:54 PM   #154
mute
Master
 
mute's Avatar
 
Join Date: Mar 2007
Location: Germany
Posts: 254
mute is on a distinguished road
Default

I just made a few tests with the API.

Looks quite well.

You can check it out at: http://regnum-online.de/api/api.php

It makes a request to the API every time you load the page. Of course it should store the data into my database in the future and only make a request every minute to be actual...


I found a small error with the gems. So far, on Haven Syrtis has all Ignis gems, but the API says that Alsius has 1 Ignis gem. The same error occurs on the War-Status page here.
__________________
Webmaster of http://regnum-online.de/
mute no ha iniciado sesión   Reply With Quote
Old 01-25-2014, 02:08 PM   #155
Adrian
NGD·Studios
 
Adrian's Avatar
 
Join Date: May 2007
Location: Wien, Österreich
Posts: 2,859
Adrian will become famous soon enoughAdrian will become famous soon enough
Default

Quote:
Originally Posted by mute View Post
I found a small error with the gems. So far, on Haven Syrtis has all Ignis gems, but the API says that Alsius has 1 Ignis gem. The same error occurs on the War-Status page here.
This is a known error, but it isn't in the API or the website. Somehow the game is storing it incorrectly.
Adrian no ha iniciado sesión   Reply With Quote
Old 01-25-2014, 04:17 PM   #156
kmdk
Master
 
kmdk's Avatar
 
Join Date: Jan 2009
Posts: 395
kmdk is on a distinguished road
Default

Quote:
Originally Posted by Wi3ld View Post
Thank you for not using XML based responses <3
You can with easy convert xml to json or JSON to XML with xml2json.
So not matter what kind of format you use ,but lets say good that finaly there is a official API

There was no barrier before to get this data before ,using cURL,grep,scraperwiki,DOM php selector ..etc and export them as json or xml from main site ..the issue is if main site is real time or not ,or is cached or not ... hopping this API is more real time ...
__________________
Blue Angel lvl 60 lock,Red Devil lvl 52 conjurer, The-End lvl 60 barb,The End lvl 60 marks ,Sir Doran- Knight
kmdk no ha iniciado sesión   Reply With Quote
Old 01-25-2014, 05:41 PM   #157
Wi3ld
Master
 
Wi3ld's Avatar
 
Join Date: Apr 2013
Location: Under your bed
Posts: 251
Wi3ld is on a distinguished road
Default

Quote:
Originally Posted by kmdk View Post
... hopping this API is more real time ...
Getting the world status (ie: Online/Offline/Under Maintenance) is Real time. Getting the war status is updated every minute, as far as I understand it.
__________________
Memoize [Knight]
Wi3ld no ha iniciado sesión   Reply With Quote
Old 01-25-2014, 10:27 PM   #158
mute
Master
 
mute's Avatar
 
Join Date: Mar 2007
Location: Germany
Posts: 254
mute is on a distinguished road
Default

Quote:
Originally Posted by Adrian View Post
This is a known error, but it isn't in the API or the website. Somehow the game is storing it incorrectly.
Answers like this really make me laugh...

I would search like hell to fix this... (if it would be in my own programs, scripts... )

Quote:
Originally Posted by Wi3ld View Post
Getting the world status (ie: Online/Offline/Under Maintenance) is Real time. Getting the war status is updated every minute, as far as I understand it.
Right... Seems to be the most actual... Real time would be better but I think it would hurt the server ^^
__________________
Webmaster of http://regnum-online.de/
mute no ha iniciado sesión   Reply With Quote
Old 01-25-2014, 10:31 PM   #159
Adrian
NGD·Studios
 
Adrian's Avatar
 
Join Date: May 2007
Location: Wien, Österreich
Posts: 2,859
Adrian will become famous soon enoughAdrian will become famous soon enough
Default

Quote:
Originally Posted by mute View Post
Answers like this really make me laugh...

I would search like hell to fix this... (if it would be in my own programs, scripts... )
Not my area, sadly. I should have said "I know this error". I'd check it too if it were my code.
Adrian no ha iniciado sesión   Reply With Quote
Old 02-03-2014, 07:42 AM   #160
Hayir
Master
 
Hayir's Avatar
 
Join Date: Jun 2007
Posts: 375
Hayir is on a distinguished road
Default

Any plans on adding the events section back?
Hayir no ha iniciado sesión   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:49 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
NGD Studios 2002-2024 © All rights reserved