A SpaceTraders Agent

list all ships

altagos.dev 8134f6ef 7cd4bfb6

verified
+21
+19
src/st/fleet.zig
··· 1 + const std = @import("std"); 2 + 3 + const st = @import("root.zig"); 4 + const Client = st.http.Client; 5 + 6 + const Response = st.http.Response; 7 + const Wrapper = st.models.Wrapper; 8 + const Query = st.models.Query; 9 + 10 + const ships = st.models.ships; 11 + 12 + pub fn listShips(cl: *Client, query: Query) !Response([]ships.Ship) { 13 + return cl.get( 14 + Wrapper([]ships.Ship), 15 + "/my/ships{f}", 16 + .{query}, 17 + .agent, 18 + ); 19 + }
+2
src/st/root.zig
··· 1 1 pub const http = @import("http.zig"); 2 2 pub const models = @import("models.zig"); 3 + 4 + pub const fleet = @import("fleet.zig");