HTTP Shopping API Documentation

Discord Shopping Bot here I come!

1 Like

A few questions:

  • Do you know what kind of authentication you are targeting? IE: OAuth 2.0 vs Simple Key vs OortianCryptoMagic?
  • Are there plans for other reference calls like the world list for things like items?
1 Like

If I understand this correctly it’s no authentication, it’s just a static API key you shove into the header.

@james are these hosted APIs at some public url or do you literally call 127 locally with the game running?

Edit: nm. Reread and see we’re querying locally to our local creative mode which runs on port 8950 so we can test it out. When the feature is released well be able to request API keys and will be provided the appropriate url.

Until they are released they are saying just start the creative mode servers locally and test against that.

I completely read past that! Thanks for pointing that out!

Not sure if that is what you are looking for

1 Like

I’m going to guess with the API key will come the URLto GET from

My guess is there is no validation on the creative server right now. As soon as I get the thing to start locally I can verify that

did anyone write a response parser yet? I have no experience with binaries :frowning:

I have some oort for sale on one of my local servers.

But when querying for it, I get a zero length response.

image

Is the response cached for a time and I should wait for it to appear, or am I doing something wrong?

Content type is text/plain here, if you check the http resonse code it will not be a 200 i’m hoping! (200 responses on this endpoint will be application/binary contenttypes). The endpoint is rate-limited to once per second to ensure cant stall responses for ‘real players’ in-game. Querying faster will just reject until a second passes.

I see, it’s a 404. I was expecting the node http library to throw an error automatically for that :smiley:

But I don’t see what’s wrong. The testing client can’t connect to creative servers atm, there’s a version mismatch, related? Or a problem with my request :thinking:

Can you share the list-gameservers response? I notice you have 2 different ports in the second screenshot.

{
  _lastUpdate: 1581859517.458244,
  addr: '192.168.43.54',
  apiURL: 'http://192.168.43.54:8859/api',
  atmosphereColor: [ 0.08850499987602234, 0.9416580200195312, 2.8768720626831055 ],
  chunksURL: 'http://192.168.43.54:8859/api/chunk',
  displayName: 'Creative',
  id: 1,
  info: {
    afkIdleInterval: 450,
    afkIdleThreshold: 900,
    maxPlayers: 0,
    players: 0,
    spawnWeight: 0.2619839906692505
  },
  ipAddr: '192.168.43.54',
  name: '1',
  numRegions: 1,
  planetsURL: 'http://192.168.43.54:8859/api/planet',
  region: 'creative',
  tier: 0,
  timeOffset: 1581846668.420033,
  waterColor: [ 0.07777100056409836, 0.31118398904800415, 0.5838239789009094 ],
  websocketURL: 'ws://192.168.43.54:8858/websocket/game',
  worldDescription: 'WORLD_TYPE_LUSH',
  worldSize: 192,
  worldType: 'LUSH'
},
{
  _lastUpdate: 1581859521.178272,
  addr: '192.168.43.54',
  apiURL: 'http://192.168.43.54:8959/api',
  atmosphereColor: [ 0.08850499987602234, 0.9416580200195312, 2.8768720626831055 ],
  chunksURL: 'http://192.168.43.54:8959/api/chunk',
  displayName: 'T3',
  id: 2,
  info: {
    afkIdleInterval: 450,
    afkIdleThreshold: 900,
    maxPlayers: 0,
    players: 0,
    spawnWeight: 0.26197099685668945
  },
  ipAddr: '192.168.43.54',
  name: '2',
  numRegions: 1,
  planetsURL: 'http://192.168.43.54:8959/api/planet',
  region: 'creative',
  tier: 2,
  timeOffset: 1581847835.290713,
  waterColor: [ 0.07777100056409836, 0.31118398904800415, 0.5838239789009094 ],
  websocketURL: 'ws://192.168.43.54:8958/websocket/game',
  worldDescription: 'WORLD_TYPE_LUSH',
  worldSize: 192,
  worldType: 'LUSH'
}

I had to skip the debug menu and run them directly from the command line, so the other server ports were copied from the first one with a small change.

“boundlessserver.exe” “–no-daemon” “–no-admin” “–config” “config/creative.json” “–port” “8858” “–apiPort” “8859” “–adminPort” “8860” “–udpPort” “8861” “–worldName” “1” “–worldId” “1” “–worldPath” “creativeworlds/1”

“boundlessserver.exe” “–no-daemon” “–no-admin” “–config” “config/creative.json” “–port” “8958” “–apiPort” “8959” “–adminPort” “8960” “–udpPort” “8961” “–worldName” “2” “–worldId” “2” “–worldPath” “creativeworlds/2”

Let me check why the Testing client is reporting a version issue.

1 Like

Latest release on Testing should work now.

3 Likes

I can confirm that it works now.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Alright, I have spent some more time trying to flush things out and I have found the following:

  • Beacon Size & Name decoded perfectly fine
  • Guild Tag Size & name decoded perfectly fine
  • The Buy From and Sell To appears to be swapped. That is Buy From lists Request Baskets and Sell To lists Shop Stands
  • When I extract the price that doesn’t seem to math out. For request basket buying at 250/275 the price comes back as 25,000. The quantity is accurate for the amount I have in there though. For the shop stand selling at 500/475 the price is 50,000 even though the quantity is 16
  • Location X appears to be the E/W value and is spot on
  • Location Z appears to be N/S but is inverted. It shows me 1075 when the game client shows me -1075
  • Location Y appears to be spot on.

I have now attempted to separate approaching to decode this. One uses a manual navigation of byte array and the second loading the byte array into a memory stream and reading through it progressively. They both net the exact same values.