27 lines
711 B
Markdown
27 lines
711 B
Markdown
# spacetraders_api_fetch
|
|
|
|
[](https://hex.pm/packages/spacetraders_api_fetch)
|
|
[](https://hexdocs.pm/spacetraders_api_fetch/)
|
|
|
|
```sh
|
|
gleam add spacetraders_api_fetch@1
|
|
```
|
|
```gleam
|
|
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
|
|
|
|
```sh
|
|
gleam run # Run the project
|
|
gleam test # Run the tests
|
|
```
|