-
Notifications
You must be signed in to change notification settings - Fork 20
/
wowgd.go
1372 lines (1231 loc) · 50.8 KB
/
wowgd.go
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
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package blizzard
import (
"context"
"fmt"
"github.com/FuzzyStatic/blizzard/v3/wowgd"
"github.com/FuzzyStatic/blizzard/v3/wowsearch"
)
// WoWAchievementCategoriesIndex returns an index of achievement categories.
func (c *Client) WoWAchievementCategoriesIndex(ctx context.Context) (*wowgd.AchievementCategoriesIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/achievement-category/index",
c.GetStaticNamespace(),
&wowgd.AchievementCategoriesIndex{},
)
return dat.(*wowgd.AchievementCategoriesIndex), header, err
}
// WoWAchievementCategory returns an achievement category by ID.
func (c *Client) WoWAchievementCategory(ctx context.Context, achievementCategoryID int) (*wowgd.AchievementCategory, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/achievement-category/%d", achievementCategoryID),
c.GetStaticNamespace(),
&wowgd.AchievementCategory{},
)
return dat.(*wowgd.AchievementCategory), header, err
}
// WoWAchievementIndex returns an index of achievements.
func (c *Client) WoWAchievementIndex(ctx context.Context) (*wowgd.AchievementIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/achievement/index",
c.GetStaticNamespace(),
&wowgd.AchievementIndex{},
)
return dat.(*wowgd.AchievementIndex), header, err
}
// WoWAchievement returns an achievement category by ID.
func (c *Client) WoWAchievement(ctx context.Context, achievementID int) (*wowgd.Achievement, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/achievement/%d", achievementID),
c.GetStaticNamespace(),
&wowgd.Achievement{},
)
return dat.(*wowgd.Achievement), header, err
}
// WoWAchievementMedia returns media for an achievement by ID.
func (c *Client) WoWAchievementMedia(ctx context.Context, achievementID int) (*wowgd.AchievementMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/achievement/%d", achievementID),
c.GetStaticNamespace(),
&wowgd.AchievementMedia{},
)
return dat.(*wowgd.AchievementMedia), header, err
}
// WoWAuctions returns all active auctions for a connected realm. See the Connected Realm API for information about retrieving a list of connected realm IDs.
// Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.
// Depending on the number of active auctions on the specified connected realm, the response from this endpoint may be rather large, sometimes exceeding 10 MB.
func (c *Client) WoWAuctions(ctx context.Context, connectedRealmID int) (*wowgd.AuctionHouse, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/connected-realm/%d/auctions", connectedRealmID),
c.GetDynamicNamespace(),
&wowgd.AuctionHouse{},
)
return dat.(*wowgd.AuctionHouse), header, err
}
// WoWAzeriteEssenceIndex returns an index of azerite essences.
func (c *Client) WoWAzeriteEssenceIndex(ctx context.Context) (*wowgd.AzeriteEssenceIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/azerite-essence/index",
c.GetStaticNamespace(),
&wowgd.AzeriteEssenceIndex{},
)
return dat.(*wowgd.AzeriteEssenceIndex), header, err
}
// WoWAzeriteEssence returns an azerite essence by ID.
func (c *Client) WoWAzeriteEssence(ctx context.Context, azeriteEssenceID int) (*wowgd.AzeriteEssence, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/azerite-essence/%d", azeriteEssenceID), c.GetStaticNamespace(),
&wowgd.AzeriteEssence{},
)
return dat.(*wowgd.AzeriteEssence), header, err
}
// WoWAzeriteEssenceMedia returns media for an azerite essence by ID.
func (c *Client) WoWAzeriteEssenceMedia(ctx context.Context, azeriteEssenceID int) (*wowgd.AzeriteEssenceMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/azerite-essence/%d", azeriteEssenceID),
c.GetStaticNamespace(),
&wowgd.AzeriteEssenceMedia{},
)
return dat.(*wowgd.AzeriteEssenceMedia), header, err
}
// WoWConnectedRealmsIndex returns an index of connected realms
func (c *Client) WoWConnectedRealmsIndex(ctx context.Context) (*wowgd.ConnectedRealmsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/connected-realm/index",
c.GetDynamicNamespace(),
&wowgd.ConnectedRealmsIndex{},
)
return dat.(*wowgd.ConnectedRealmsIndex), header, err
}
// WoWConnectedRealm returns a single connected realm by ID
func (c *Client) WoWConnectedRealm(ctx context.Context, connectedRealmID int) (*wowgd.ConnectedRealm, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/connected-realm/%d", connectedRealmID),
c.GetDynamicNamespace(),
&wowgd.ConnectedRealm{},
)
return dat.(*wowgd.ConnectedRealm), header, err
}
// WoWCovenantsIndex returns an index of covenants.
func (c *Client) WoWCovenantsIndex(ctx context.Context) (*wowgd.CovenantsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/covenant/index",
c.GetStaticNamespace(),
&wowgd.CovenantsIndex{},
)
return dat.(*wowgd.CovenantsIndex), header, err
}
// WoWConnectedRealmSearch searches for connected realms
func (c *Client) WoWConnectedRealmSearch(ctx context.Context, opts ...wowsearch.Opt) (*wowgd.ConnectedRealmsSearch, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/search/connected-realm%s", buildSearchParams(opts...)),
c.GetDynamicNamespace(),
&wowgd.ConnectedRealmsSearch{},
)
return dat.(*wowgd.ConnectedRealmsSearch), header, err
}
// WoWCovenant returns a covenant by ID.
func (c *Client) WoWCovenant(ctx context.Context, covenantID int) (*wowgd.Covenant, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/covenant/%d", covenantID),
c.GetStaticNamespace(),
&wowgd.Covenant{},
)
return dat.(*wowgd.Covenant), header, err
}
// WoWCovenantMedia returns media for a covenant by ID.
func (c *Client) WoWCovenantMedia(ctx context.Context, covenantID int) (*wowgd.CovenantMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/covenant/%d", covenantID),
c.GetStaticNamespace(),
&wowgd.CovenantMedia{},
)
return dat.(*wowgd.CovenantMedia), header, err
}
// WoWCovenantSoulbindsIndex returns an index of soulbinds.
func (c *Client) WoWCovenantSoulbindsIndex(ctx context.Context) (*wowgd.CovenantSoulbindsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/covenant/soulbind/index",
c.GetStaticNamespace(),
&wowgd.CovenantSoulbindsIndex{},
)
return dat.(*wowgd.CovenantSoulbindsIndex), header, err
}
// WoWCovenantSoulbind returns a soulbind by ID.
func (c *Client) WoWCovenantSoulbind(ctx context.Context, soulbindID int) (*wowgd.CovenantSoulbind, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/covenant/soulbind/%d", soulbindID),
c.GetStaticNamespace(),
&wowgd.CovenantSoulbind{},
)
return dat.(*wowgd.CovenantSoulbind), header, err
}
// WoWCovenantConduitsIndex returns an index of conduits.
func (c *Client) WoWCovenantConduitsIndex(ctx context.Context) (*wowgd.CovenantConduitsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/covenant/conduit/index",
c.GetStaticNamespace(),
&wowgd.CovenantConduitsIndex{},
)
return dat.(*wowgd.CovenantConduitsIndex), header, err
}
// WoWCovenantConduit returns a conduit by ID.
func (c *Client) WoWCovenantConduit(ctx context.Context, conduitID int) (*wowgd.CovenantConduit, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/covenant/conduit/%d", conduitID),
c.GetStaticNamespace(),
&wowgd.CovenantConduit{},
)
return dat.(*wowgd.CovenantConduit), header, err
}
// WoWCreatureFamiliesIndex returns an index of creature families.
func (c *Client) WoWCreatureFamiliesIndex(ctx context.Context) (*wowgd.CreatureFamiliesIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/creature-family/index",
c.GetStaticNamespace(),
&wowgd.CreatureFamiliesIndex{},
)
return dat.(*wowgd.CreatureFamiliesIndex), header, err
}
// WoWCreatureFamily returns a creature family by ID.
func (c *Client) WoWCreatureFamily(ctx context.Context, creatureFamilyID int) (*wowgd.CreatureFamily, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/creature-family/%d", creatureFamilyID),
c.GetStaticNamespace(),
&wowgd.CreatureFamily{},
)
return dat.(*wowgd.CreatureFamily), header, err
}
// WoWCreatureTypesIndex returns an index of creature types.
func (c *Client) WoWCreatureTypesIndex(ctx context.Context) (*wowgd.CreatureTypesIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/creature-type/index",
c.GetStaticNamespace(),
&wowgd.CreatureTypesIndex{},
)
return dat.(*wowgd.CreatureTypesIndex), header, err
}
// WoWCreatureType returns a creature type by ID.
func (c *Client) WoWCreatureType(ctx context.Context, creatureTypeID int) (*wowgd.CreatureType, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/creature-type/%d", creatureTypeID),
c.GetStaticNamespace(),
&wowgd.CreatureType{},
)
return dat.(*wowgd.CreatureType), header, err
}
// WoWCreature returns a creature type by ID.
func (c *Client) WoWCreature(ctx context.Context, creatureID int) (*wowgd.Creature, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/creature/%d", creatureID),
c.GetStaticNamespace(),
&wowgd.Creature{},
)
return dat.(*wowgd.Creature), header, err
}
// WoWCreatureDisplayMedia returns media for a creature display by ID.
func (c *Client) WoWCreatureDisplayMedia(ctx context.Context, creatureDisplayID int) (*wowgd.CreatureDisplayMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/creature-display/%d", creatureDisplayID),
c.GetStaticNamespace(),
&wowgd.CreatureDisplayMedia{},
)
return dat.(*wowgd.CreatureDisplayMedia), header, err
}
// WoWCreatureFamilyMedia returns media for a creature family by ID.
func (c *Client) WoWCreatureFamilyMedia(ctx context.Context, creatureFamilyID int) (*wowgd.CreatureFamilyMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/creature-family/%d", creatureFamilyID),
c.GetStaticNamespace(),
&wowgd.CreatureFamilyMedia{},
)
return dat.(*wowgd.CreatureFamilyMedia), header, err
}
// WoWGuildCrestComponentsIndex returns an index of guild crest media.
func (c *Client) WoWGuildCrestComponentsIndex(ctx context.Context) (*wowgd.GuildCrestComponentsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/guild-crest/index",
c.GetStaticNamespace(),
&wowgd.GuildCrestComponentsIndex{},
)
return dat.(*wowgd.GuildCrestComponentsIndex), header, err
}
// WoWGuildCrestBorderMedia returns media for a guild crest border by ID.
func (c *Client) WoWGuildCrestBorderMedia(ctx context.Context, borderID int) (*wowgd.GuildCrestBorderMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/guild-crest/border/%d", borderID),
c.GetStaticNamespace(),
&wowgd.GuildCrestBorderMedia{},
)
return dat.(*wowgd.GuildCrestBorderMedia), header, err
}
// WoWGuildCrestEmblemMedia returns media for a guild crest emblem by ID.
func (c *Client) WoWGuildCrestEmblemMedia(ctx context.Context, emblemID int) (*wowgd.GuildCrestEmblemMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/guild-crest/emblem/%d", emblemID),
c.GetStaticNamespace(),
&wowgd.GuildCrestEmblemMedia{},
)
return dat.(*wowgd.GuildCrestEmblemMedia), header, err
}
// WoWItemClassesIndex returns an index of item classes.
func (c *Client) WoWItemClassesIndex(ctx context.Context) (*wowgd.ItemClassesIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/item-class/index",
c.GetStaticNamespace(),
&wowgd.ItemClassesIndex{},
)
return dat.(*wowgd.ItemClassesIndex), header, err
}
// WoWItemClass returns an item class by ID.
func (c *Client) WoWItemClass(ctx context.Context, itemClassID int) (*wowgd.ItemClass, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/item-class/%d", itemClassID),
c.GetStaticNamespace(),
&wowgd.ItemClass{},
)
return dat.(*wowgd.ItemClass), header, err
}
// WoWItemSetsIndex returns an index of item sets.
func (c *Client) WoWItemSetsIndex(ctx context.Context) (*wowgd.ItemSetsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/item-set/index",
c.GetStaticNamespace(),
&wowgd.ItemSetsIndex{},
)
return dat.(*wowgd.ItemSetsIndex), header, err
}
// WoWItemSet returns an item set by ID.
func (c *Client) WoWItemSet(ctx context.Context, itemSetID int) (*wowgd.ItemSet, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/item-set/%d", itemSetID),
c.GetStaticNamespace(),
&wowgd.ItemSet{},
)
return dat.(*wowgd.ItemSet), header, err
}
// WoWItemSubclass returns an item subclass by ID.
func (c *Client) WoWItemSubclass(ctx context.Context, itemClassID, itemSubclassID int) (*wowgd.ItemSubclass, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/item-class/%d/item-subclass/%d", itemClassID, itemSubclassID),
c.GetStaticNamespace(),
&wowgd.ItemSubclass{},
)
return dat.(*wowgd.ItemSubclass), header, err
}
// WoWItem returns an item by ID.
func (c *Client) WoWItem(ctx context.Context, itemID int) (*wowgd.Item, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/item/%d", itemID),
c.GetStaticNamespace(),
&wowgd.Item{},
)
return dat.(*wowgd.Item), header, err
}
// WoWItemSearch item search data.
func (c *Client) WoWItemSearch(ctx context.Context, opts ...wowsearch.Opt) (*wowgd.ItemSearch, *Header, error) {
dat, header, err := c.getStructData(
ctx,
fmt.Sprintf("/data/wow/search/item%s", buildSearchParams(opts...)),
c.GetStaticNamespace(),
&wowgd.ItemSearch{},
)
return dat.(*wowgd.ItemSearch), header, err
}
// WoWItemMedia returns media for an item by ID.
func (c *Client) WoWItemMedia(ctx context.Context, itemID int) (*wowgd.ItemMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/item/%d", itemID),
c.GetStaticNamespace(),
&wowgd.ItemMedia{},
)
return dat.(*wowgd.ItemMedia), header, err
}
// WoWItemAppearance returns an item appearance by ID.
func (c *Client) WoWItemAppearance(ctx context.Context, appearanceID int) (*wowgd.ItemAppearance, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/item-appearance/%d", appearanceID),
c.GetStaticNamespace(),
&wowgd.ItemAppearance{},
)
return dat.(*wowgd.ItemAppearance), header, err
}
// WoWItemAppearanceSearch item appearance search data.
func (c *Client) WoWItemAppearanceSearch(ctx context.Context, opts ...wowsearch.Opt) (*wowgd.ItemAppearanceSearch, *Header, error) {
dat, header, err := c.getStructData(
ctx,
fmt.Sprintf("/data/wow/search/item-appearance%s", buildSearchParams(opts...)),
c.GetStaticNamespace(),
&wowgd.ItemAppearanceSearch{},
)
return dat.(*wowgd.ItemAppearanceSearch), header, err
}
// WoWItemAppearanceSetsIndex returns an index of item appearance sets.
func (c *Client) WoWItemAppearanceSetsIndex(ctx context.Context) (*wowgd.ItemAppearanceSetsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/item-appearance/set/index",
c.GetStaticNamespace(),
&wowgd.ItemAppearanceSetsIndex{},
)
return dat.(*wowgd.ItemAppearanceSetsIndex), header, err
}
// WoWItemAppearanceSet returns an item appearance set by ID.
func (c *Client) WoWItemAppearanceSet(ctx context.Context, itemAppearanceSetID int) (*wowgd.ItemAppearanceSet, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/item-appearance/set/%d", itemAppearanceSetID),
c.GetStaticNamespace(),
&wowgd.ItemAppearanceSet{},
)
return dat.(*wowgd.ItemAppearanceSet), header, err
}
// WoWItemAppearanceSlotIndex returns an index of item appearance slot.
func (c *Client) WoWItemAppearanceSlotIndex(ctx context.Context) (*wowgd.ItemAppearanceSlotIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/item-appearance/slot/index",
c.GetStaticNamespace(),
&wowgd.ItemAppearanceSlotIndex{},
)
return dat.(*wowgd.ItemAppearanceSlotIndex), header, err
}
// WoWItemAppearanceSlot returns an item appearance slot by slot type.
func (c *Client) WoWItemAppearanceSlot(ctx context.Context, itemAppearanceSlot string) (*wowgd.ItemAppearanceSlot, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/item-appearance/slot/%d", itemAppearanceSlot),
c.GetStaticNamespace(),
&wowgd.ItemAppearanceSlot{},
)
return dat.(*wowgd.ItemAppearanceSlot), header, err
}
// WoWJournalExpansionsIndex returns an index of journal expansions.
func (c *Client) WoWJournalExpansionsIndex(ctx context.Context) (*wowgd.JournalExpansionsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/journal-expansion/index",
c.GetStaticNamespace(),
&wowgd.JournalExpansionsIndex{},
)
return dat.(*wowgd.JournalExpansionsIndex), header, err
}
// WoWJournalExpansion returns a journal expansion by ID.
func (c *Client) WoWJournalExpansion(ctx context.Context, journalExpansionID int) (*wowgd.JournalExpansion, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/journal-expansion/%d", journalExpansionID),
c.GetStaticNamespace(),
&wowgd.JournalExpansion{},
)
return dat.(*wowgd.JournalExpansion), header, err
}
// WoWJournalEncountersIndex returns an index of journal encounters.
func (c *Client) WoWJournalEncountersIndex(ctx context.Context) (*wowgd.JournalEncountersIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/journal-encounter/index",
c.GetStaticNamespace(),
&wowgd.JournalEncountersIndex{},
)
return dat.(*wowgd.JournalEncountersIndex), header, err
}
// WoWJournalEncounter returns a journal expansion by ID.
func (c *Client) WoWJournalEncounter(ctx context.Context, journalEncounterID int) (*wowgd.JournalEncounter, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/journal-encounter/%d", journalEncounterID),
c.GetStaticNamespace(),
&wowgd.JournalEncounter{},
)
return dat.(*wowgd.JournalEncounter), header, err
}
// WoWJournalInstancesIndex returns an index of journal instances.
func (c *Client) WoWJournalInstancesIndex(ctx context.Context) (*wowgd.JournalInstancesIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/journal-instance/index",
c.GetStaticNamespace(),
&wowgd.JournalInstancesIndex{},
)
return dat.(*wowgd.JournalInstancesIndex), header, err
}
// WoWJournalInstance returns a journal instance.
func (c *Client) WoWJournalInstance(ctx context.Context, journalInstanceID int) (*wowgd.JournalInstance, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/journal-instance/%d", journalInstanceID),
c.GetStaticNamespace(),
&wowgd.JournalInstance{},
)
return dat.(*wowgd.JournalInstance), header, err
}
// WoWJournalInstanceMedia returns media for a journal instance by ID.
func (c *Client) WoWJournalInstanceMedia(ctx context.Context, journalInstanceID int) (*wowgd.JournalInstanceMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/journal-instance/%d", journalInstanceID),
c.GetStaticNamespace(),
&wowgd.JournalInstanceMedia{},
)
return dat.(*wowgd.JournalInstanceMedia), header, err
}
// WoWMediaSearch returns media search data.
func (c *Client) WoWMediaSearch(ctx context.Context, tags, orderBy string, page int) (*wowgd.MediaSearch, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/search/media?tags=%s&orderby=%s&_page=%d&access_token=%s", tags, orderBy, page, c.oauth.Token.AccessToken),
c.GetStaticNamespace(),
&wowgd.MediaSearch{},
)
return dat.(*wowgd.MediaSearch), header, err
}
// WoWModifiedCraftingIndex returns the parent index for Modified Crafting.
func (c *Client) WoWModifiedCraftingIndex(ctx context.Context) (*wowgd.ModifiedCraftingIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/modified-crafting/index",
c.GetStaticNamespace(),
&wowgd.ModifiedCraftingIndex{},
)
return dat.(*wowgd.ModifiedCraftingIndex), header, err
}
// WoWModifiedCraftingCategoryIndex returns the index of Modified Crafting categories.
func (c *Client) WoWModifiedCraftingCategoryIndex(ctx context.Context) (*wowgd.ModifiedCraftingCategoryIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/modified-crafting/category/index",
c.GetStaticNamespace(),
&wowgd.ModifiedCraftingCategoryIndex{},
)
return dat.(*wowgd.ModifiedCraftingCategoryIndex), header, err
}
// WoWModifiedCraftingCategory returns a Modified Crafting category by ID.
func (c *Client) WoWModifiedCraftingCategory(ctx context.Context, categoryID int) (*wowgd.ModifiedCraftingCategory, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/modified-crafting/category/%d", categoryID),
c.GetStaticNamespace(),
&wowgd.ModifiedCraftingCategory{},
)
return dat.(*wowgd.ModifiedCraftingCategory), header, err
}
// WoWModifiedCraftingReagentSlotTypeIndex returns the index of Modified Crafting reagent slot types.
func (c *Client) WoWModifiedCraftingReagentSlotTypeIndex(ctx context.Context) (*wowgd.ModifiedCraftingReagentSlotTypeIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/modified-crafting/reagent-slot-type/index",
c.GetStaticNamespace(),
&wowgd.ModifiedCraftingReagentSlotTypeIndex{},
)
return dat.(*wowgd.ModifiedCraftingReagentSlotTypeIndex), header, err
}
// WoWModifiedCraftingReagentSlotType returns a Modified Crafting reagent slot type by ID.
func (c *Client) WoWModifiedCraftingReagentSlotType(ctx context.Context,
slotTypeID int) (*wowgd.ModifiedCraftingReagentSlotType, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/modified-crafting/reagent-slot-type/%d", slotTypeID),
c.GetStaticNamespace(),
&wowgd.ModifiedCraftingReagentSlotType{},
)
return dat.(*wowgd.ModifiedCraftingReagentSlotType), header, err
}
// WoWMountIndex returns an index of mounts.
func (c *Client) WoWMountIndex(ctx context.Context) (*wowgd.MountIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/mount/index",
c.GetStaticNamespace(),
&wowgd.MountIndex{},
)
return dat.(*wowgd.MountIndex), header, err
}
// WoWMount returns a mount by ID.
func (c *Client) WoWMount(ctx context.Context, mountID int) (*wowgd.Mount, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/mount/%d", mountID),
c.GetStaticNamespace(),
&wowgd.Mount{},
)
return dat.(*wowgd.Mount), header, err
}
// WoWMountSearch mount search data.
func (c *Client) WoWMountSearch(ctx context.Context, opts ...wowsearch.Opt) (*wowgd.MountSearch, *Header, error) {
dat, header, err := c.getStructData(
ctx,
fmt.Sprintf("/data/wow/search/mount%s", buildSearchParams(opts...)),
c.GetStaticNamespace(),
&wowgd.MountSearch{},
)
return dat.(*wowgd.MountSearch), header, err
}
// WoWMythicKeystoneAffixIndex returns an index of Keystone affixes
func (c *Client) WoWMythicKeystoneAffixIndex(ctx context.Context) (*wowgd.MythicKeystoneAffixIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/keystone-affix/index",
c.GetStaticNamespace(),
&wowgd.MythicKeystoneAffixIndex{},
)
return dat.(*wowgd.MythicKeystoneAffixIndex), header, err
}
// WoWMythicKeystoneAffix returns a single connected realm by ID
func (c *Client) WoWMythicKeystoneAffix(ctx context.Context, keystoneAffixID int) (*wowgd.MythicKeystoneAffix, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/keystone-affix/%d", keystoneAffixID),
c.GetStaticNamespace(),
&wowgd.MythicKeystoneAffix{},
)
return dat.(*wowgd.MythicKeystoneAffix), header, err
}
// WoWMythicKeystoneAffixMedia returns media for a mythic keystone affix by ID.
func (c *Client) WoWMythicKeystoneAffixMedia(ctx context.Context, keystoneAffixID int) (*wowgd.MythicKeystoneAffixMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/keystone-affix/%d", keystoneAffixID),
c.GetStaticNamespace(),
&wowgd.MythicKeystoneAffixMedia{},
)
return dat.(*wowgd.MythicKeystoneAffixMedia), header, err
}
// WoWMythicKeystoneDungeonIndex returns an index of Mythic Keystone dungeons
func (c *Client) WoWMythicKeystoneDungeonIndex(ctx context.Context) (*wowgd.MythicKeystoneDungeonIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/mythic-keystone/dungeon/index",
c.GetDynamicNamespace(),
&wowgd.MythicKeystoneDungeonIndex{},
)
return dat.(*wowgd.MythicKeystoneDungeonIndex), header, err
}
// WoWMythicKeystoneDungeon returns a Mythic Keystone dungeon by ID
func (c *Client) WoWMythicKeystoneDungeon(ctx context.Context, dungeonID int) (*wowgd.MythicKeystoneDungeon, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/mythic-keystone/dungeon/%d", dungeonID),
c.GetDynamicNamespace(),
&wowgd.MythicKeystoneDungeon{},
)
return dat.(*wowgd.MythicKeystoneDungeon), header, err
}
// WoWMythicKeystoneIndex returns n index of links to other documents related to Mythic Keystone dungeons
func (c *Client) WoWMythicKeystoneIndex(ctx context.Context) (*wowgd.MythicKeystoneIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/mythic-keystone/index",
c.GetDynamicNamespace(),
&wowgd.MythicKeystoneIndex{},
)
return dat.(*wowgd.MythicKeystoneIndex), header, err
}
// WoWMythicKeystonePeriodIndex returns an index of Mythic Keystone periods
func (c *Client) WoWMythicKeystonePeriodIndex(ctx context.Context) (*wowgd.MythicKeystonePeriodIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/mythic-keystone/period/index",
c.GetDynamicNamespace(),
&wowgd.MythicKeystonePeriodIndex{},
)
return dat.(*wowgd.MythicKeystonePeriodIndex), header, err
}
// WoWMythicKeystonePeriod returns a Mythic Keystone period by ID
func (c *Client) WoWMythicKeystonePeriod(ctx context.Context, periodID int) (*wowgd.MythicKeystonePeriod, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/mythic-keystone/period/%d", periodID),
c.GetDynamicNamespace(),
&wowgd.MythicKeystonePeriod{},
)
return dat.(*wowgd.MythicKeystonePeriod), header, err
}
// WoWMythicKeystoneSeasonIndex returns an index of Mythic Keystone seasons
func (c *Client) WoWMythicKeystoneSeasonIndex(ctx context.Context) (*wowgd.MythicKeystoneSeasonIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/mythic-keystone/season/index",
c.GetDynamicNamespace(),
&wowgd.MythicKeystoneSeasonIndex{},
)
return dat.(*wowgd.MythicKeystoneSeasonIndex), header, err
}
// WoWMythicKeystoneSeason returns a Mythic Keystone season by ID
func (c *Client) WoWMythicKeystoneSeason(ctx context.Context, seasonID int) (*wowgd.MythicKeystoneSeason, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/mythic-keystone/season/%d", seasonID),
c.GetDynamicNamespace(),
&wowgd.MythicKeystoneSeason{},
)
return dat.(*wowgd.MythicKeystoneSeason), header, err
}
// WoWMythicKeystoneLeaderboardIndex returns an index of Mythic Keystone Leaderboard dungeon instances for a connected realm
func (c *Client) WoWMythicKeystoneLeaderboardIndex(ctx context.Context,
connectedRealmID int) (*wowgd.MythicKeystoneLeaderboardIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/connected-realm/%d/mythic-leaderboard/index", connectedRealmID),
c.GetDynamicNamespace(),
&wowgd.MythicKeystoneLeaderboardIndex{},
)
return dat.(*wowgd.MythicKeystoneLeaderboardIndex), header, err
}
// WoWMythicKeystoneLeaderboard returns a weekly Mythic Keystone Leaderboard by period
func (c *Client) WoWMythicKeystoneLeaderboard(ctx context.Context,
connectedRealmID, dungeonID, period int) (*wowgd.MythicKeystoneLeaderboard, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/connected-realm/%d/mythic-leaderboard/%d/period/%d",
connectedRealmID, dungeonID, period),
c.GetDynamicNamespace(),
&wowgd.MythicKeystoneLeaderboard{},
)
return dat.(*wowgd.MythicKeystoneLeaderboard), header, err
}
// WoWMythicRaidLeaderboard returns the leaderboard for a given raid and faction
func (c *Client) WoWMythicRaidLeaderboard(ctx context.Context, raid, faction string) (*wowgd.MythicRaidLeaderboard, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/leaderboard/hall-of-fame/%s/%s", raid, faction),
c.GetDynamicNamespace(),
&wowgd.MythicRaidLeaderboard{},
)
return dat.(*wowgd.MythicRaidLeaderboard), header, err
}
// WoWPetIndex returns an index of pets.
func (c *Client) WoWPetIndex(ctx context.Context) (*wowgd.PetIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/pet/index",
c.GetStaticNamespace(),
&wowgd.PetIndex{},
)
return dat.(*wowgd.PetIndex), header, err
}
// WoWPet returns a pet by ID.
func (c *Client) WoWPet(ctx context.Context, petID int) (*wowgd.Pet, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/pet/%d", petID),
c.GetStaticNamespace(),
&wowgd.Pet{},
)
return dat.(*wowgd.Pet), header, err
}
// WoWPetMedia returns media information for a pet ID.
func (c *Client) WoWPetMedia(ctx context.Context, petID int) (*wowgd.PetMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/pet/%d", petID),
c.GetStaticNamespace(),
&wowgd.PetMedia{},
)
return dat.(*wowgd.PetMedia), header, err
}
// WoWPetAbilityIndex returns an index of pet abilities.
func (c *Client) WoWPetAbilityIndex(ctx context.Context) (*wowgd.PetAbilityIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/pet-ability/index",
c.GetStaticNamespace(),
&wowgd.PetAbilityIndex{},
)
return dat.(*wowgd.PetAbilityIndex), header, err
}
// WoWPetAbility returns a pet ability by ID.
func (c *Client) WoWPetAbility(ctx context.Context, petAbilityID int) (*wowgd.PetAbility, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/pet-ability/%d", petAbilityID),
c.GetStaticNamespace(),
&wowgd.PetAbility{},
)
return dat.(*wowgd.PetAbility), header, err
}
// WoWPetAbilityMedia returns media information for a pet ID.
func (c *Client) WoWPetAbilityMedia(ctx context.Context, petAbilityID int) (*wowgd.PetMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/pet-ability/%d", petAbilityID),
c.GetStaticNamespace(),
&wowgd.PetMedia{},
)
return dat.(*wowgd.PetMedia), header, err
}
// WoWPlayableClassesIndex returns an index of playable classes
func (c *Client) WoWPlayableClassesIndex(ctx context.Context) (*wowgd.PlayableClassesIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/playable-class/index",
c.GetStaticNamespace(),
&wowgd.PlayableClassesIndex{},
)
return dat.(*wowgd.PlayableClassesIndex), header, err
}
// WoWPlayableClass returns a playable class by ID
func (c *Client) WoWPlayableClass(ctx context.Context, classID int) (*wowgd.PlayableClass, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/playable-class/%d", classID),
c.GetStaticNamespace(),
&wowgd.PlayableClass{},
)
return dat.(*wowgd.PlayableClass), header, err
}
// WoWPlayableClassMedia returns media for a playable class by ID.
func (c *Client) WoWPlayableClassMedia(ctx context.Context, classID int) (*wowgd.PlayableClassMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/playable-class/%d", classID),
c.GetStaticNamespace(),
&wowgd.PlayableClassMedia{},
)
return dat.(*wowgd.PlayableClassMedia), header, err
}
// WoWPlayableClassPvPTalentSlots returns the PvP talent slots for a playable class by ID
func (c *Client) WoWPlayableClassPvPTalentSlots(ctx context.Context, classID int) (*wowgd.PlayableClassPvPTalentSlots, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/playable-class/%d/pvp-talent-slots", classID),
c.GetStaticNamespace(),
&wowgd.PlayableClassPvPTalentSlots{},
)
return dat.(*wowgd.PlayableClassPvPTalentSlots), header, err
}
// WoWPlayableRacesIndex returns an index of races.
func (c *Client) WoWPlayableRacesIndex(ctx context.Context) (*wowgd.PlayableRacesIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/playable-race/index",
c.GetStaticNamespace(),
&wowgd.PlayableRacesIndex{},
)
return dat.(*wowgd.PlayableRacesIndex), header, err
}
// WoWPlayableRace returns a race by ID.
func (c *Client) WoWPlayableRace(ctx context.Context, raceID int) (*wowgd.PlayableRace, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/playable-race/%d", raceID),
c.GetStaticNamespace(),
&wowgd.PlayableRace{},
)
return dat.(*wowgd.PlayableRace), header, err
}
// WoWPlayableSpecializationIndex returns an index of playable specializations.
func (c *Client) WoWPlayableSpecializationIndex(ctx context.Context) (*wowgd.PlayableSpecializationIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/playable-specialization/index",
c.GetStaticNamespace(),
&wowgd.PlayableSpecializationIndex{},
)
return dat.(*wowgd.PlayableSpecializationIndex), header, err
}
// WoWPlayableSpecialization returns a playable specialization by ID.
func (c *Client) WoWPlayableSpecialization(ctx context.Context, specID int) (*wowgd.PlayableSpecialization, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/playable-specialization/%d", specID),
c.GetStaticNamespace(),
&wowgd.PlayableSpecialization{},
)
return dat.(*wowgd.PlayableSpecialization), header, err
}
// WoWPlayableSpecializationMedia returns media for a playable specialization by ID.
func (c *Client) WoWPlayableSpecializationMedia(ctx context.Context, specID int) (*wowgd.PlayableSpecializationMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/playable-specialization/%d", specID),
c.GetStaticNamespace(),
&wowgd.PlayableSpecializationMedia{},
)
return dat.(*wowgd.PlayableSpecializationMedia), header, err
}
// WoWPowerTypesIndex returns an index of power types.
func (c *Client) WoWPowerTypesIndex(ctx context.Context) (*wowgd.PowerTypesIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/power-type/index",
c.GetStaticNamespace(),
&wowgd.PowerTypesIndex{},
)
return dat.(*wowgd.PowerTypesIndex), header, err
}
// WoWPowerType returns a power type by ID.
func (c *Client) WoWPowerType(ctx context.Context, powerTypeID int) (*wowgd.PowerType, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/power-type/%d", powerTypeID),
c.GetStaticNamespace(),
&wowgd.PowerType{},
)
return dat.(*wowgd.PowerType), header, err
}
// WoWProfessionsIndex returns an index of professions.
func (c *Client) WoWProfessionsIndex(ctx context.Context) (*wowgd.ProfessionsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/profession/index",
c.GetStaticNamespace(),
&wowgd.ProfessionsIndex{},
)
return dat.(*wowgd.ProfessionsIndex), header, err
}
// WoWProfession returns a profession by ID.
func (c *Client) WoWProfession(ctx context.Context, professionID int) (*wowgd.Profession, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/profession/%d", professionID),
c.GetStaticNamespace(),
&wowgd.Profession{},
)
return dat.(*wowgd.Profession), header, err
}
// WoWProfessionMedia returns media for a profession by ID.
func (c *Client) WoWProfessionMedia(ctx context.Context, professionID int) (*wowgd.ProfessionMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/profession/%d", professionID),
c.GetStaticNamespace(),
&wowgd.ProfessionMedia{},
)
return dat.(*wowgd.ProfessionMedia), header, err
}
// WoWProfessionSkillTier returns a skill tier for a profession by ID.
func (c *Client) WoWProfessionSkillTier(ctx context.Context, professionID, skillTierID int) (*wowgd.ProfessionSkillTier, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/profession/%d/skill-tier/%d", professionID, skillTierID),
c.GetStaticNamespace(),
&wowgd.ProfessionSkillTier{},
)
return dat.(*wowgd.ProfessionSkillTier), header, err
}
// WoWRecipe returns a recipe by ID.
func (c *Client) WoWRecipe(ctx context.Context, recipeID int) (*wowgd.Recipe, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/recipe/%d", recipeID),
c.GetStaticNamespace(),
&wowgd.Recipe{},
)
return dat.(*wowgd.Recipe), header, err
}
// WoWRecipeMedia returns media for a recipe by ID.
func (c *Client) WoWRecipeMedia(ctx context.Context, recipeID int) (*wowgd.RecipeMedia, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/media/recipe/%d", recipeID),
c.GetStaticNamespace(),
&wowgd.RecipeMedia{},
)
return dat.(*wowgd.RecipeMedia), header, err
}
// WoWPvPSeasonIndex returns an index of PvP seasons.
func (c *Client) WoWPvPSeasonIndex(ctx context.Context) (*wowgd.PvPSeasonIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
"/data/wow/pvp-season/index",
c.GetDynamicNamespace(),
&wowgd.PvPSeasonIndex{},
)
return dat.(*wowgd.PvPSeasonIndex), header, err
}
// WoWPvPSeason returns a PvP season by ID.
func (c *Client) WoWPvPSeason(ctx context.Context, pvpSeasonID int) (*wowgd.PvPSeason, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/pvp-season/%d", pvpSeasonID),
c.GetDynamicNamespace(),
&wowgd.PvPSeason{},
)
return dat.(*wowgd.PvPSeason), header, err
}
// WoWPvPLeaderboardsIndex returns an index of PvP leaderboards for a PvP season.
func (c *Client) WoWPvPLeaderboardsIndex(ctx context.Context, pvpSeasonID int) (*wowgd.PvPLeaderboardsIndex, *Header, error) {
dat, header, err := c.getStructData(ctx,
fmt.Sprintf("/data/wow/pvp-season/%d/pvp-leaderboard/index", pvpSeasonID),
c.GetDynamicNamespace(),
&wowgd.PvPLeaderboardsIndex{},
)
return dat.(*wowgd.PvPLeaderboardsIndex), header, err
}