gleam-spacetraders-sdk/src/models/scanned_ship_engine.gleam
Lily Rose cc8edbed02
Some checks are pending
test / test (push) Waiting to run
Add functioning sdk
2025-06-17 01:43:06 +10:00

11 lines
326 B
Gleam

import gleam/dynamic/decode.{type Decoder}
import models/engine_symbol.{type EngineSymbol}
pub type ScannedShipEngine {
ScannedShipEngine(symbol: EngineSymbol)
}
pub fn decoder() -> Decoder(ScannedShipEngine) {
use symbol <- decode.field("symbol", engine_symbol.decoder())
decode.success(ScannedShipEngine(symbol:))
}