gleam-spacetraders-sdk/src/models/waypoint_modifier.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

17 lines
551 B
Gleam

import gleam/dynamic/decode.{type Decoder}
import models/waypoint_modifier_symbol.{type WaypointModifierSymbol}
pub type WaypointModifier {
WaypointModifier(
symbol: WaypointModifierSymbol,
name: String,
description: String,
)
}
pub fn decoder() -> Decoder(WaypointModifier) {
use symbol <- decode.field("symbol", waypoint_modifier_symbol.decoder())
use name <- decode.field("name", decode.string)
use description <- decode.field("description", decode.string)
decode.success(WaypointModifier(symbol:, name:, description:))
}