Gleam functions for interacting with the spacetraders.io game API using gleam_fetch
Find a file
Lily Rose 678314ae8b
Some checks failed
test / test (push) Failing after 2s
Update to v2.0.0 of api
2025-12-13 23:25:44 +11:00
.github/workflows Initial commit 2025-07-09 03:13:32 +10:00
src Update to v2.0.0 of api 2025-12-13 23:25:44 +11:00
test Update to v2.0.0 of api 2025-12-13 23:25:44 +11:00
.gitignore Initial commit 2025-07-09 03:13:32 +10:00
gleam.toml Update to v2.0.0 of api 2025-12-13 23:25:44 +11:00
LICENSE.md Initial commit 2025-07-09 03:13:32 +10:00
manifest.toml Update to v2.0.0 of api 2025-12-13 23:25:44 +11:00
README.md Update to v2.0.0 of api 2025-12-13 23:25:44 +11:00

spacetraders_api_fetch

Package Version Hex Docs

gleam add spacetraders_api_fetch@2
import spacetraders_api_fetch
import gleam/javascript/promise

pub fn main() -> Nil {
  use res <- promise.map(spacetraders_api_fetch.get_server_status())
  let assert Ok(server_status) = res
  io.println(server_status.status)
}

Further documentation can be found at https://hexdocs.pm/spacetraders_api_fetch.

Development

gleam run   # Run the project
gleam test  # Run the tests