gleam-spacetraders-sdk/src/models/system_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
314 B
Gleam

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