tangled
alpha
login
or
join now
altagos.dev
/
space
0
fork
atom
A SpaceTraders Agent
0
fork
atom
overview
issues
pulls
pipelines
list all ships
altagos.dev
3 months ago
8134f6ef
7cd4bfb6
verified
This commit was signed with the committer's
known signature
.
altagos.dev
SSH Key Fingerprint:
SHA256:UbTjEcCZlc6GzQWLCuDK3D//HESWD2xFPkzue9XMras=
+21
2 changed files
expand all
collapse all
unified
split
src
st
fleet.zig
root.zig
+19
src/st/fleet.zig
···
1
1
+
const std = @import("std");
2
2
+
3
3
+
const st = @import("root.zig");
4
4
+
const Client = st.http.Client;
5
5
+
6
6
+
const Response = st.http.Response;
7
7
+
const Wrapper = st.models.Wrapper;
8
8
+
const Query = st.models.Query;
9
9
+
10
10
+
const ships = st.models.ships;
11
11
+
12
12
+
pub fn listShips(cl: *Client, query: Query) !Response([]ships.Ship) {
13
13
+
return cl.get(
14
14
+
Wrapper([]ships.Ship),
15
15
+
"/my/ships{f}",
16
16
+
.{query},
17
17
+
.agent,
18
18
+
);
19
19
+
}
+2
src/st/root.zig
···
1
1
pub const http = @import("http.zig");
2
2
pub const models = @import("models.zig");
3
3
+
4
4
+
pub const fleet = @import("fleet.zig");