Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[API] Sector Map
#1
0
https://www.my-colony.com/api.php?pf=3&g...=100&ind=1
(limit and ind parameters optional)

Parameters:

sx: Sector X coord
sy: Sector Y coord
limit: Return top X colonies (by population) (optional)
ind: When ind=1, return only independent (Commonwealth Capitol) colonies (optional)

Without optional parameters (return whole sector): https://www.my-colony.com/api.php?pf=3&g=1&sx=0&sy=0

Note: Each sector is an x,y grid 2000x2000 in size, ranging from -1000:-1000 to 

Returns JSON formatted sector data array:

Code:
[{"name":"United Earth","charter":"earth","capitol":"1","population":"124689321","maptype":"n\/a","theme":"#4B92DB","x":"0","y":"0"},{"name":"dusty","charter":"8Dgg0e6H","capitol":"1","population":"149162","maptype":"Red Planet","theme":"#b35900","x":"544","y":"-232"},{"name":"Prosperity","charter":"hMXn8PVe","capitol":"1","population":"148616","maptype":"Red Planet","theme":"#1976D2","x":"453","y":"-24"}]
  • data array, ordered by population:
  • name: colony name
  • charter: charter code
  • capitol: 1 or 0, is this colony a commonwealth capitol
  • population: the population of the colony
  • maptype: what kind of planet it is (Red Planet, Lunar, etc)
  • theme: theme color for the colony, hex code
  • x: x location within the sector
  • y: y location within the sector
Owner of Ape Apps

My Main Colony: Domination
https://www.my-colony.com/colonies/jGTKNfWT/
Reply
#2
0
(04-18-2017, 08:19 PM)bastecklein Wrote: https://www.my-colony.com/api.php?pf=3&g...=100&ind=1
(limit and ind parameters optional)

Parameters:

sx: Sector X coord
sy: Sector Y coord
limit: Return top X colonies (by population) (optional)
ind: When ind=1, return only independent (Commonwealth Capitol) colonies (optional)

Without optional parameters (return whole sector): https://www.my-colony.com/api.php?pf=3&g=1&sx=0&sy=0

Note: Each sector is an x,y grid 2000x2000 in size, ranging from -1000:-1000 to 

Returns JSON formatted sector data array:

Code:
[{"name":"United Earth","charter":"earth","capitol":"1","population":"124689321","maptype":"n\/a","theme":"#4B92DB","x":"0","y":"0"},{"name":"dusty","charter":"8Dgg0e6H","capitol":"1","population":"149162","maptype":"Red Planet","theme":"#b35900","x":"544","y":"-232"},{"name":"Prosperity","charter":"hMXn8PVe","capitol":"1","population":"148616","maptype":"Red Planet","theme":"#1976D2","x":"453","y":"-24"}]
  • data array, ordered by population:
  • name: colony name
  • charter: charter code
  • capitol: 1 or 0, is this colony a commonwealth capitol
  • population: the population of the colony
  • maptype: what kind of planet it is (Red Planet, Lunar, etc)
  • theme: theme color for the colony, hex code
  • x: x location within the sector
  • y: y location within the sector

I trust you are sanitizing your inputs for colony name?  I think when I first started playing I could use colons in the colony name.  Maybe I'm wrong.
Reply
#3
1
Better response on post RE: [API] Sector MapI have noticed that United Earth has "capitol" at 0...
Look yourself here : https://www.my-colony.com/api.php?pf=3&g=1&sx=0&sy=0
It should be 1, and if we look at Zolarg Prime and Independent States it's 1, wich seems more logic.
It's also 1 in your original post.
Reply
#4
0
(05-29-2017, 03:22 PM)Sobeirannòvaocc Wrote: I have noticed that United Earth has "capitol" at 0...
Look yourself here : https://www.my-colony.com/api.php?pf=3&g=1&sx=0&sy=0
It should be 1, and if we look at Zolarg Prime and Independent States it's 1, wich seems more logic.
It's also 1 in your original post.

Thank you, good catch
Owner of Ape Apps

My Main Colony: Domination
https://www.my-colony.com/colonies/jGTKNfWT/
Reply
#5
0
Any NASA engineers in the house ? Looks like a  NASA plotting to send a ship to mars lol 
    Going to need a super computer to plot a course to someones colony .
  PS space is 7 D  btw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)
Shoutbox

« archive

avatar
Any Chance that The iOS blackscreen bug will get fixed?Sad
avatar
hello
avatar
@Patchdaddy any chance there will be any form of redirect put in place. this will be my last message on this forum just want to know.
avatar
Please use the new forum located here: https://www.ape-apps.com/viewpage.php?p=4 This forum will be discontinued soon.
avatar
why all the full stop spam? @Ville
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.
avatar
.