polyoxide-gamma 0.15.0

Rust client library for Polymarket Gamma (market data) API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
//! Live integration tests against the Polymarket Gamma API.
//!
//! These tests hit the real API and require network access.
//! They are gated behind `#[ignore]` so they don't run in CI.
//!
//! Run manually with:
//! ```sh
//! cargo test -p polyoxide-gamma --test live_api -- --ignored
//! ```

use polyoxide_gamma::Gamma;
use std::time::Duration;

fn client() -> Gamma {
    Gamma::builder().build().expect("gamma client")
}

// ── Health ───────────────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_ping() {
    let gamma = client();
    let latency = gamma.health().ping().await.expect("ping should succeed");
    assert!(
        latency < Duration::from_secs(10),
        "latency too high: {latency:?}"
    );
}

// ── Markets ──────────────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_list_markets() {
    let gamma = client();
    let markets = gamma
        .markets()
        .list()
        .limit(5)
        .send()
        .await
        .expect("list markets");
    assert!(!markets.is_empty(), "should return at least one market");
}

#[tokio::test]
#[ignore]
async fn live_get_market_by_id() {
    let gamma = client();
    let markets = gamma
        .markets()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list markets to discover id");
    let first = markets.first().expect("need at least one market");
    let id = first.id.clone();

    let market = gamma
        .markets()
        .get(&id)
        .send()
        .await
        .expect("get market by id");
    assert_eq!(market.id, id);
}

#[tokio::test]
#[ignore]
async fn live_get_market_by_slug() {
    let gamma = client();
    let markets = gamma
        .markets()
        .list()
        .limit(10)
        .send()
        .await
        .expect("list markets to discover slug");
    let market_with_slug = markets
        .iter()
        .find(|m| m.slug.is_some())
        .expect("need at least one market with a slug");
    let slug = market_with_slug.slug.as_ref().unwrap().clone();

    let market = gamma
        .markets()
        .get_by_slug(&slug)
        .send()
        .await
        .expect("get market by slug");
    assert_eq!(market.slug.as_deref(), Some(slug.as_str()));
}

#[tokio::test]
#[ignore]
async fn live_list_markets_closed_true() {
    let gamma = client();
    let markets = gamma
        .markets()
        .list()
        .closed(true)
        .limit(5)
        .send()
        .await
        .expect("list closed markets");
    assert!(
        !markets.is_empty(),
        "should return at least one closed market"
    );
    for m in &markets {
        assert_eq!(m.closed, Some(true), "market {} should be closed", m.id);
    }
}

#[tokio::test]
#[ignore]
async fn live_list_markets_closed_false() {
    let gamma = client();
    let markets = gamma
        .markets()
        .list()
        .closed(false)
        .limit(5)
        .send()
        .await
        .expect("list open markets");
    assert!(
        !markets.is_empty(),
        "should return at least one open market"
    );
    for m in &markets {
        assert_ne!(m.closed, Some(true), "market {} should not be closed", m.id);
    }
}

#[tokio::test]
#[ignore]
async fn live_get_many_returns_both_open_and_closed() {
    let gamma = client();

    // Discover one open and one closed market ID.
    let open = gamma
        .markets()
        .list()
        .closed(false)
        .limit(1)
        .send()
        .await
        .expect("list open markets");
    let closed = gamma
        .markets()
        .list()
        .closed(true)
        .limit(1)
        .send()
        .await
        .expect("list closed markets");

    let open_id: i64 = open
        .first()
        .expect("need an open market")
        .id
        .parse()
        .expect("open market id should be numeric");
    let closed_id: i64 = closed
        .first()
        .expect("need a closed market")
        .id
        .parse()
        .expect("closed market id should be numeric");

    let markets = gamma
        .markets()
        .get_many([open_id, closed_id])
        .send()
        .await
        .expect("get_many should succeed");

    let open_str = open_id.to_string();
    let closed_str = closed_id.to_string();
    let returned: Vec<&str> = markets.iter().map(|m| m.id.as_str()).collect();
    assert!(
        returned.contains(&open_str.as_str()),
        "open market {open_id} missing from get_many result: {returned:?}"
    );
    assert!(
        returned.contains(&closed_str.as_str()),
        "closed market {closed_id} missing from get_many result: {returned:?}"
    );
    assert!(
        markets.iter().any(|m| m.closed == Some(true)),
        "get_many result should include the closed market with closed=true"
    );
}

#[tokio::test]
#[ignore]
async fn live_get_market_description() {
    let gamma = client();

    // Discover a market id.
    let markets = gamma
        .markets()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list markets to discover id");
    let first = markets.first().expect("need at least one market");

    let desc = gamma
        .markets()
        .get_description(&first.id)
        .send()
        .await
        .expect("get market description");
    // Deserialization succeeded; description may be None/empty on some markets.
    let _ = desc;
}

#[tokio::test]
#[ignore]
async fn live_query_markets_by_information() {
    use polyoxide_gamma::types::MarketsInformationBody;

    let gamma = client();

    // Discover a market id so we have something concrete to query.
    let markets = gamma
        .markets()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list markets");
    let first = markets.first().expect("need at least one market");
    let id: i64 = first.id.parse().expect("market id should be numeric");

    let body = MarketsInformationBody {
        id: vec![id],
        ..Default::default()
    };
    let found = gamma
        .markets()
        .query_by_information(body)
        .send()
        .await
        .expect("POST /markets/information");
    assert!(
        found.iter().any(|m| m.id == first.id),
        "expected market {} in response",
        first.id
    );
}

#[tokio::test]
#[ignore]
async fn live_query_abridged_markets() {
    use polyoxide_gamma::types::MarketsInformationBody;

    let gamma = client();
    let body = MarketsInformationBody {
        closed: Some(false),
        ..Default::default()
    };
    let found = gamma
        .markets()
        .query_abridged(body)
        .send()
        .await
        .expect("POST /markets/abridged");
    // Deserialization is the primary assertion; the array may be empty.
    let _ = found;
}

#[tokio::test]
#[ignore]
async fn live_list_markets_keyset() {
    let gamma = client();
    let resp = gamma
        .markets()
        .list_keyset()
        .limit(5)
        .send()
        .await
        .expect("list markets (keyset)");
    // Deserialization is the assertion; upstream may page differently.
    let _ = resp;
}

// ── Events ──────────────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_list_events() {
    let gamma = client();
    let events = gamma
        .events()
        .list()
        .limit(5)
        .send()
        .await
        .expect("list events");
    assert!(!events.is_empty(), "should return at least one event");
}

#[tokio::test]
#[ignore]
async fn live_get_event_by_id() {
    let gamma = client();
    let events = gamma
        .events()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list events to discover id");
    let first = events.first().expect("need at least one event");
    let id = first.id.clone();

    let event = gamma
        .events()
        .get(&id)
        .send()
        .await
        .expect("get event by id");
    assert_eq!(event.id, id);
}

#[tokio::test]
#[ignore]
async fn live_get_event_by_slug() {
    let gamma = client();
    let events = gamma
        .events()
        .list()
        .limit(10)
        .send()
        .await
        .expect("list events to discover slug");
    let event_with_slug = events
        .iter()
        .find(|e| e.slug.is_some())
        .expect("need at least one event with a slug");
    let slug = event_with_slug.slug.as_ref().unwrap().clone();

    let event = gamma
        .events()
        .get_by_slug(&slug)
        .send()
        .await
        .expect("get event by slug");
    assert_eq!(event.slug.as_deref(), Some(slug.as_str()));
}

#[tokio::test]
#[ignore]
async fn live_list_event_creators() {
    let gamma = client();
    let creators = gamma
        .events()
        .list_creators()
        .limit(5)
        .send()
        .await
        .expect("list event creators");
    let _ = creators; // may be empty; deserialization is the assertion
}

#[tokio::test]
#[ignore]
async fn live_list_events_pagination() {
    let gamma = client();
    let resp = gamma
        .events()
        .list_paginated()
        .limit(3)
        .send()
        .await
        .expect("list paginated events");
    // Data may be empty when no matching events; struct must deserialize.
    let _ = resp;
}

#[tokio::test]
#[ignore]
async fn live_list_events_results() {
    let gamma = client();
    let _events = gamma
        .events()
        .list_results()
        .limit(3)
        .send()
        .await
        .expect("list event results");
}

#[tokio::test]
#[ignore]
async fn live_list_events_keyset() {
    let gamma = client();
    let resp = gamma
        .events()
        .list_keyset()
        .limit(5)
        .send()
        .await
        .expect("list events (keyset)");
    let _ = resp; // events may be empty on some configurations; deserialization is the assertion
}

// ── Tags ────────────────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_list_tags() {
    let gamma = client();
    let tags = gamma
        .tags()
        .list()
        .limit(5)
        .send()
        .await
        .expect("list tags");
    assert!(!tags.is_empty(), "should return at least one tag");
}

#[tokio::test]
#[ignore]
async fn live_get_tag_by_id() {
    let gamma = client();
    let tags = gamma
        .tags()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list tags to discover id");
    let first = tags.first().expect("need at least one tag");
    let id = first.id.clone();

    let tag = gamma.tags().get(&id).send().await.expect("get tag by id");
    assert_eq!(tag.id, id);
}

#[tokio::test]
#[ignore]
async fn live_get_tag_by_slug() {
    let gamma = client();
    let tags = gamma
        .tags()
        .list()
        .limit(10)
        .send()
        .await
        .expect("list tags to discover slug");
    let first = tags.first().expect("need at least one tag");
    let slug = first.slug.clone();

    let tag = gamma
        .tags()
        .get_by_slug(&slug)
        .send()
        .await
        .expect("get tag by slug");
    assert_eq!(tag.slug, slug);
}

#[tokio::test]
#[ignore]
async fn live_get_related_tags() {
    let gamma = client();
    let tags = gamma
        .tags()
        .list()
        .limit(10)
        .send()
        .await
        .expect("list tags to discover id");
    let first = tags.first().expect("need at least one tag");
    let id = first.id.clone();

    // Related tags may be empty for some tags, but the call should succeed.
    let _related = gamma
        .tags()
        .get_related(&id)
        .send()
        .await
        .expect("get related tags");
}

// ── Series ──────────────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_list_series() {
    let gamma = client();
    let series = gamma
        .series()
        .list()
        .limit(5)
        .send()
        .await
        .expect("list series");
    assert!(!series.is_empty(), "should return at least one series");
}

#[tokio::test]
#[ignore]
async fn live_get_series_by_id() {
    let gamma = client();
    let series = gamma
        .series()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list series to discover id");
    let first = series.first().expect("need at least one series");
    let id = first.id.clone();

    let s = gamma
        .series()
        .get(&id)
        .send()
        .await
        .expect("get series by id");
    assert_eq!(s.id, id);
}

#[tokio::test]
#[ignore]
async fn live_get_series_summary() {
    let gamma = client();
    let series = gamma
        .series()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list series to discover id");
    let first = series.first().expect("need at least one series");

    let summary = gamma
        .series()
        .get_summary(&first.id)
        .send()
        .await
        .expect("get series summary by id");
    assert_eq!(summary.id, first.id);
}

#[tokio::test]
#[ignore]
async fn live_get_series_summary_by_slug() {
    let gamma = client();
    let series = gamma
        .series()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list series to discover slug");
    let first = series.first().expect("need at least one series");
    let slug = first.slug.clone();

    let summary = gamma
        .series()
        .get_summary_by_slug(&slug)
        .send()
        .await
        .expect("get series summary by slug");
    // The upstream may map slug to a different summary id, but deserialization
    // is the primary assertion here.
    let _ = summary;
}

#[tokio::test]
#[ignore]
async fn live_series_comment_count() {
    let gamma = client();
    let series = gamma
        .series()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list series to discover id");
    let first = series.first().expect("need at least one series");
    let count = gamma
        .series()
        .comment_count(&first.id)
        .send()
        .await
        .expect("get series comment count");
    // Deserialization is the primary assertion; count is u64 so any value is
    // valid.
    let _ = count;
}

// ── Sports ──────────────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_list_sports() {
    let gamma = client();
    let sports = gamma.sports().list().send().await.expect("list sports");
    assert!(
        !sports.is_empty(),
        "should return at least one sport metadata entry"
    );
}

#[tokio::test]
#[ignore]
async fn live_list_teams() {
    let gamma = client();
    let teams = gamma
        .sports()
        .list_teams()
        .limit(5)
        .send()
        .await
        .expect("list teams");
    assert!(!teams.is_empty(), "should return at least one team");
}

#[tokio::test]
#[ignore]
async fn live_get_team_by_id() {
    let gamma = client();
    let teams = gamma
        .sports()
        .list_teams()
        .limit(1)
        .send()
        .await
        .expect("list teams to discover id");
    let first = teams.first().expect("need at least one team");
    let id = first.id.to_string();

    let team = gamma
        .sports()
        .get_team(&id)
        .send()
        .await
        .expect("get team by id");
    assert_eq!(team.id, first.id);
}

// ── Comments ────────────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_list_comments() {
    let gamma = client();

    // The comments endpoint requires parent_entity_type and parent_entity_id.
    // Discover an event ID first.
    let events = gamma
        .events()
        .list()
        .limit(5)
        .send()
        .await
        .expect("list events to discover id for comments");
    let first = events.first().expect("need at least one event");
    let event_id: i64 = first.id.parse().expect("event id should be numeric");

    let comments = gamma
        .comments()
        .list()
        .parent_entity_type("Event")
        .parent_entity_id(event_id)
        .limit(5)
        .send()
        .await
        .expect("list comments");
    // Some events may have no comments, but deserialization must succeed.
    let _ = comments;
}

// ── Comments: get and by_user ───────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_get_comment_by_id() {
    let gamma = client();

    // Discover a comment ID from listing
    let events = gamma
        .events()
        .list()
        .active(true)
        .limit(5)
        .send()
        .await
        .expect("list events");
    let first = events.first().expect("need at least one event");
    let event_id: i64 = first.id.parse().expect("event id should be numeric");

    let comments = gamma
        .comments()
        .list()
        .parent_entity_type("Event")
        .parent_entity_id(event_id)
        .limit(1)
        .send()
        .await
        .expect("list comments");

    if let Some(comment) = comments.first() {
        let fetched = gamma
            .comments()
            .get(&comment.id)
            .send()
            .await
            .expect("get comment by id");
        assert_eq!(fetched.id, comment.id);
    }
}

// ── Events: related by ID, tags, counts ────────────────────────

#[tokio::test]
#[ignore]
async fn live_event_tags() {
    let gamma = client();
    let events = gamma
        .events()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list events");
    let first = events.first().expect("need at least one event");

    let _tags = gamma
        .events()
        .tags(&first.id)
        .send()
        .await
        .expect("get event tags");
}

// ── Markets: tags ──────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_market_tags() {
    let gamma = client();
    let markets = gamma
        .markets()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list markets");
    let first = markets.first().expect("need at least one market");

    let _tags = gamma
        .markets()
        .tags(&first.id)
        .send()
        .await
        .expect("get market tags");
}

// ── Sports: market types ───────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_sports_market_types() {
    let gamma = client();
    let _types = gamma
        .sports()
        .market_types()
        .send()
        .await
        .expect("sports market types should deserialize");
}

// ── Search ──────────────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_public_search() {
    let gamma = client();
    let results = gamma
        .search()
        .public_search("bitcoin")
        .search_profiles(true)
        .limit_per_type(5)
        .send()
        .await
        .expect("public search");
    // Search may return empty results for some queries,
    // but deserialization must succeed.
    let _ = results;
}

// ── User ────────────────────────────────────────────────────────

#[tokio::test]
#[ignore]
async fn live_get_user() {
    let gamma = client();

    // Discover a real user address from comments.
    let events = gamma
        .events()
        .list()
        .active(true)
        .limit(5)
        .send()
        .await
        .expect("list events");
    let first = events.first().expect("need at least one event");
    let event_id: i64 = first.id.parse().expect("event id should be numeric");

    let comments = gamma
        .comments()
        .list()
        .parent_entity_type("Event")
        .parent_entity_id(event_id)
        .limit(20)
        .send()
        .await
        .expect("list comments to find a user");

    if let Some(comment) = comments.first() {
        let user_id = &comment.user.id;
        let user = gamma
            .user()
            .get(user_id)
            .send()
            .await
            .expect("get user profile");
        // Deserialization succeeded; the profile may have sparse fields.
        let _ = user;
    }
    // If no comments found, skip silently -- the endpoint itself is
    // exercised in the request path even when no suitable address exists.
}

#[tokio::test]
#[ignore]
async fn live_get_profile_by_address() {
    let gamma = client();

    // Discover a real user proxy-wallet address via the public-profile
    // endpoint; fall back to exercising the endpoint with a burner address if
    // no real user is found.
    let events = gamma
        .events()
        .list()
        .active(true)
        .limit(5)
        .send()
        .await
        .expect("list events");
    let Some(first) = events.first() else { return };
    let event_id: i64 = first.id.parse().expect("event id should be numeric");

    let comments = gamma
        .comments()
        .list()
        .parent_entity_type("Event")
        .parent_entity_id(event_id)
        .limit(20)
        .send()
        .await
        .expect("list comments to find an address");

    let Some(comment) = comments.first() else {
        return;
    };
    let user = gamma
        .user()
        .get(&comment.user.id)
        .send()
        .await
        .expect("resolve user to proxy wallet");
    let Some(address) = user.proxy.clone() else {
        return;
    };

    // The endpoint returns 404 for non-profile addresses; treat that as a
    // valid contract exercise. Only successful deserializations are asserted.
    if let Ok(profile) = gamma.user().get_by_address(&address).send().await {
        // The profile may have sparse fields, but id must always be present.
        assert!(!profile.id.is_empty(), "profile id must not be empty");
    }
}

#[tokio::test]
#[ignore]
async fn live_get_event_creator_by_id() {
    let gamma = client();
    let creators = gamma
        .events()
        .list_creators()
        .limit(1)
        .send()
        .await
        .expect("list event creators to discover id");
    let Some(first) = creators.first() else {
        return; // No creators available; treat as skip.
    };
    let _ = gamma
        .events()
        .get_creator(&first.id)
        .send()
        .await
        .expect("get event creator by id");
}

#[tokio::test]
#[ignore]
async fn live_get_related_detailed_by_id() {
    let gamma = client();
    let tags = gamma
        .tags()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list tags to discover id");
    let first = tags.first().expect("need at least one tag");
    let _ = gamma
        .tags()
        .get_related_detailed(&first.id)
        .send()
        .await
        .expect("get related detailed by id");
}

#[tokio::test]
#[ignore]
async fn live_get_related_detailed_by_slug() {
    let gamma = client();
    let tags = gamma
        .tags()
        .list()
        .limit(1)
        .send()
        .await
        .expect("list tags to discover slug");
    let first = tags.first().expect("need at least one tag");
    let _ = gamma
        .tags()
        .get_related_detailed_by_slug(&first.slug)
        .send()
        .await
        .expect("get related detailed by slug");
}