Not logged in | Log In
Pirates of the Burning Sea logo
 
 
Pirates of the Burning Sea Forums > Archive > Retired Forums > The Map Table
Click here to Log In

 
 
Thread Tools Display Modes
  #11  
Old 03-26-2008, 03:42 AM
Join Date: Jan 2008
Server: Antigua
Society: Knights of the Golden Lion
Nation: Britisch
Career: Naval Officer
 
Default

Quote:
Originally Posted by Thomas Grogg View Post
The page that generates developer keys (http://www.burningsea.com/pages/developer) is just redirecting back to the home page...
That happens when you're not logged in.
When you are logged in, you'll get another page.
JurGradi is offline Add to ignore list
  #12  
Old 03-26-2008, 04:11 AM
Join Date: Jan 2008
 
Default

Quote:
Originally Posted by JurGradi View Post
That happens when you're not logged in.
When you are logged in, you'll get another page.
Aye, that did the trick . i still dont get used to being logged into the forums is not the same as being logged in to the main page
Aye_Moody is offline Add to ignore list
  #13  
Old 03-26-2008, 04:51 AM
Join Date: Jan 2008
 
Default

for those of you not familiar with HTTP POST actions here is a very quick(and very dirty) way to access the data using your web browser:

1. open an editor like notepad
2. copy the following content and replace yourapikey and youruserid with the proper values for your account (keep the "" though)
Code:
<html>
<body>
<form action="http://data.burningsea.com/servers" method="post">
<input type="hidden" name="apikey" value="yourapikey">
<input type="hidden" name="userid" value="youruserid">
<input type="submit" value="Show Server List">
</form></body></html>
4. save the notepad to your hard disk, call it test.html (or whatever you like)
3. open your web browser
4. choose FILE|OPEN|BROWSE from the menu bar
5. pick your test.html file, your web browser will now display one button labled "Show Server List" - push it
6. your browser will now show an emtpy page, because the return answer is not formatted to HTML or XML style
7. choose VIEW|SOURCE CODE from the menu bar and you will see the result


to call another API simply replace the action="http://data.burningsea.com/servers" to the URL you want to use

Enjoy, won’t you?
(Always wanted to say that )
Aye_Moody is offline Add to ignore list
  #14  
Old 03-26-2008, 05:24 AM
Join Date: Jan 2008
Server: Rackham
Society: Los Bucaneros De Tarifa
Nation: Spain
Career: Freetrader
 
Default

May I suggest also adding another section to the forums, perhaps under user content, so that we may discuss the API and offer up suggestions of data formatting as well as help each other with code for it?
__________________
Bartolo Cardenas
Los Bucaneros de Tarifa
waterhouse is offline Add to ignore list
  #15  
Old 03-26-2008, 07:20 AM
Join Date: Jan 2008
Server: Rack...oberts
Society: Me Myself And I
Nation: British
Career: Freetrader
 
Default

There's some 'conflict' in the API.

The landmark (translated) queries return the current circle sizes. And the normal landmark query has a cache of 10 minutes, yet the translated landmark query has one of 60 minutes.

If one would use the API to translate the coordinates and sizes, then those sizes could be wrong for an hour!
Why not simply return sizes for all possible situations, and let the programmer choose which to use in which situations?

LM_NORMAL: no circles
LM_PIRATE: 1 circle
LM_PVP: 2 circles,with full-pvp circle the size of the 1 circle above
LM_CONTENTION: 2 circles, which are both larger than the ones in LM_PVP

So, you could just give 4 (or 5) circle sizes, which the programmer can then simply cache, only needing the current port states.
Edit: Hmm, I guess I was wrong about the different sizes. Somehow I thought that in full contention the circles were even a bit bigger, but the don't seem to be. It's a bit confusing, with them named fullPvPRange and piratePvPRange, being the 'current' radius.


* Also, is there a special state for when a port is raided, or is that LM_PIRATE too? (Listing all states in the documentation might be handy) Ah yes.. that's LM_RAIDED

* A third small remark; "Landmark Location (Translated)" doesn't mention the pirate/full PVP range values. They are simply 'fit' to the viewport too. (I mean, the description doesn't, the code does of course)

* And a bigger issue: Current (complete and translated) landmark data does show unrest numbers and states for New Orleans and Campeche on Rackham, but both have '0' range (pirate & fullPVP). Something is amiss here.
* Same with La Isabella, though that might be because it was recently raided.
ArmEagle is offline Add to ignore list

Last edited by ArmEagle : 03-26-2008 at 09:41 AM.
  #16  
Old 03-26-2008, 08:04 AM
ktatroe
Web Guy
 
Join Date: Jan 2008
 
Default

Quote:
Originally Posted by waterhouse View Post
May I suggest also adding another section to the forums, perhaps under user content, so that we may discuss the API and offer up suggestions of data formatting as well as help each other with code for it?
That's a great idea; I'll try to make that happen.
ktatroe is offline Add to ignore list
  #17  
Old 03-26-2008, 08:08 AM
ktatroe
Web Guy
 
Join Date: Jan 2008
 
Default

Quote:
Originally Posted by ArmEagle View Post
That's just a little bit sloppy.
When I get a moment, I'll snag Brendan and we'll take a closer look at this. The difference is intentional, though perhaps unnecessary. The world viewport uses (x,z) coordinates, while images use (x,y) coordinates, so we have the API returning different values based on the kind of coordinates you're looking at.
ktatroe is offline Add to ignore list
  #18  
Old 03-26-2008, 08:58 AM
Join Date: Jan 2008
Server: Rack...oberts
Society: Me Myself And I
Nation: British
Career: Freetrader
 
Default

Quote:
Originally Posted by ktatroe View Post
When I get a moment, I'll snag Brendan and we'll take a closer look at this. The difference is intentional, though perhaps unnecessary. The world viewport uses (x,z) coordinates, while images use (x,y) coordinates, so we have the API returning different values based on the kind of coordinates you're looking at.
Yeah, it isn't really important. But hey, APIs should be plain and simple! .
ArmEagle is offline Add to ignore list
  #19  
Old 03-26-2008, 10:21 AM
Xaphod
Purple fish of Doom!

 
Xaphod's Avatar

Join Date: Jan 2008
Server: Rackham
Society: Disciples of Aether
Nation: Pirate
Career: Lettuce
 
Default

a few questions..
the API says -
"ENGLAND - The current English population on this server; either 0 (Light), 1 (Moderate), 2 (Heavy), or 3 (Very Heavy)"
So am I right in thinking this is NOT the same as the text shown in the server select screen, because that shows the WEEKLY MAX population of that faction not the CURRENT population. If it does show the same weekly max population then this data is much less useful and really you'd only need to update the cache when things do change.

The API states that the population figures are optional and shows an example where only england is shown. In what circumstances would the query only return a single nation, and what would the default for the other nations be in that circumstance?
Also.. it's Britain, not England.

"The port state XML contains <PortList> element, which in turn contains zero or more <Port> elements. The port elements detail information about a port on that server, including PvP state, server victory state, its location in the world, and so on."
This reads a little oddly. Surely in all circumstances this would be a list of ALL the ports in game? If not, when would it return less than that, and when should we expect it to contain zero ports?
__________________
Proud creator of the Atlas, Agamemnon, Leviathan, Peregrine and Bahamut. :arr:
I DJ on Eve Radio on Sunday Evenings at 6pm GMT / 7pm british summer time.
Xaphod is offline Add to ignore list
  #20  
Old 03-26-2008, 10:31 AM
ktatroe
Web Guy
 
Join Date: Jan 2008
 
Default

Quote:
Originally Posted by Xaphod View Post
a few questions..
the API says -
"ENGLAND - The current English population on this server; either 0 (Light), 1 (Moderate), 2 (Heavy), or 3 (Very Heavy)"
So am I right in thinking this is NOT the same as the text shown in the server select screen, because that shows the WEEKLY MAX population of that faction not the CURRENT population. If it does show the same weekly max population then this data is much less useful and really you'd only need to update the cache when things do change.
It is currently not the same as the values shown in the client, though the intention is to change it to that value eventually, I think. Brendan and I are going to be figuring that out in the coming days. It's possible (though don't take this as a promise) that we'll end up providing both (an immediate snapshot and a rolling weekly "high tide").

If that's something you'd like to see, be sure to let us know.

Quote:
The API states that the population figures are optional and shows an example where only england is shown. In what circumstances would the query only return a single nation, and what would the default for the other nations be in that circumstance?
It'd not show the optional parameters in the rare case that nation has never had a character on that server. For most purposes, you can assume that case simply won't ever exist, though handling it is pretty straightforward.

There wouldn't be a default value in that case -- it'd simply indicate that nation doesn't have a horse in the race yet.

Quote:
"The port state XML contains <PortList> element, which in turn contains zero or more <Port> elements. The port elements detail information about a port on that server, including PvP state, server victory state, its location in the world, and so on."
This reads a little oddly. Surely in all circumstances this would be a list of ALL the ports in game? If not, when would it return less than that, and when should we expect it to contain zero ports?
Like the above, in real-world situations, you'd never see anything less than "everything", but in certain circumstances in test servers, we might see less internally. Keeping to one standard for data exchange ensures we have a lot fewer problems (not having to write code twice to do essentially the same thing means there's half the number of bugs!).

That said, most good XML libraries will handle "zero or more" child elements just as well as "1 or more", so there should be little to no practical difference between the two.
ktatroe is offline Add to ignore list
 


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 09:57 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.