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
@UltimoDeNinja, That's a cool thought too.
avatar
probably not. there may be such big changes that we're gonna want to start over
avatar
I just had a really funny thought. Do you think when the final version of My Colony is released we'll all have to start from scratch with new games?
avatar
meh.. I want my 100 bln
avatar
whats with all the new buildings sneaking in!! I'm not complaining, just would like some info on them.
avatar
some nice value so..
avatar
hello. I reload game and my gift from contrac sold disappear
avatar
Plastic will likely drop in price soon with the new advanced plastic building
avatar
I can give you 20k plastic
avatar
What's your charter code @cooldawg123?
avatar
srry 3 bil
avatar
ok that kinda sucks since i need about 20k, and id have to pay 300mil
avatar
than you have to produce it yourself. plastic is a rare resource, so if you want to buy it instead of making it, you have to pay the prices in the GBT
avatar
or the galactic freight (im not gonna pay those bs prices for plastic in the GBT)
avatar
i just noticed that there is no plastic in the space elevator importing market
avatar
@cooldawg123 it does. it does not if you minimize the window. but if you open another programm and don't minimize the chrome window, it'll continue.
avatar
creep
avatar
why?
avatar
i noticed that the chrome version does not continue in the background
avatar
My population suddenly stopped growing at 324... Even though I have more than enough housing and landing pads!