gleam-spacetraders-sdk/src/models/waypoint_faction.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
322 B
Gleam

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