-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.go
751 lines (687 loc) · 23.5 KB
/
functions.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
package tvdb
import (
"github.com/pkg/errors"
"github.com/dashotv/tvdb/openapi/models/operations"
)
// GetArtworkBase wraps the generated openapi.SDK.Artwork.GetArtworkBase call
func (c *Client) GetArtworkBase(id float64) (*GetArtworkBaseResponse, error) {
r, err := c.sdk.Artwork.GetArtworkBase(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetArtworkExtended wraps the generated openapi.SDK.Artwork.GetArtworkExtended call
func (c *Client) GetArtworkExtended(id float64) (*GetArtworkExtendedResponse, error) {
r, err := c.sdk.Artwork.GetArtworkExtended(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllArtworkStatuses wraps the generated openapi.SDK.ArtworkStatuses.GetAllArtworkStatuses call
func (c *Client) GetAllArtworkStatuses() (*GetAllArtworkStatusesResponse, error) {
r, err := c.sdk.ArtworkStatuses.GetAllArtworkStatuses(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllArtworkTypes wraps the generated openapi.SDK.ArtworkTypes.GetAllArtworkTypes call
func (c *Client) GetAllArtworkTypes() (*GetAllArtworkTypesResponse, error) {
r, err := c.sdk.ArtworkTypes.GetAllArtworkTypes(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAwardCategory wraps the generated openapi.SDK.AwardCategories.GetAwardCategory call
func (c *Client) GetAwardCategory(id float64) (*GetAwardCategoryResponse, error) {
r, err := c.sdk.AwardCategories.GetAwardCategory(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAwardCategoryExtended wraps the generated openapi.SDK.AwardCategories.GetAwardCategoryExtended call
func (c *Client) GetAwardCategoryExtended(id float64) (*GetAwardCategoryExtendedResponse, error) {
r, err := c.sdk.AwardCategories.GetAwardCategoryExtended(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllAwards wraps the generated openapi.SDK.Awards.GetAllAwards call
func (c *Client) GetAllAwards() (*GetAllAwardsResponse, error) {
r, err := c.sdk.Awards.GetAllAwards(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAward wraps the generated openapi.SDK.Awards.GetAward call
func (c *Client) GetAward(id float64) (*GetAwardResponse, error) {
r, err := c.sdk.Awards.GetAward(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAwardExtended wraps the generated openapi.SDK.Awards.GetAwardExtended call
func (c *Client) GetAwardExtended(id float64) (*GetAwardExtendedResponse, error) {
r, err := c.sdk.Awards.GetAwardExtended(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetCharacterBase wraps the generated openapi.SDK.Characters.GetCharacterBase call
func (c *Client) GetCharacterBase(id float64) (*GetCharacterBaseResponse, error) {
r, err := c.sdk.Characters.GetCharacterBase(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllCompanies wraps the generated openapi.SDK.Companies.GetAllCompanies call
func (c *Client) GetAllCompanies(page *float64) (*GetAllCompaniesResponse, error) {
r, err := c.sdk.Companies.GetAllCompanies(c.ctx, page)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetCompany wraps the generated openapi.SDK.Companies.GetCompany call
func (c *Client) GetCompany(id float64) (*GetCompanyResponse, error) {
r, err := c.sdk.Companies.GetCompany(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetCompanyTypes wraps the generated openapi.SDK.Companies.GetCompanyTypes call
func (c *Client) GetCompanyTypes() (*GetCompanyTypesResponse, error) {
r, err := c.sdk.Companies.GetCompanyTypes(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllContentRatings wraps the generated openapi.SDK.ContentRatings.GetAllContentRatings call
func (c *Client) GetAllContentRatings() (*GetAllContentRatingsResponse, error) {
r, err := c.sdk.ContentRatings.GetAllContentRatings(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllCountries wraps the generated openapi.SDK.Countries.GetAllCountries call
func (c *Client) GetAllCountries() (*GetAllCountriesResponse, error) {
r, err := c.sdk.Countries.GetAllCountries(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetEntityTypes wraps the generated openapi.SDK.EntityTypes.GetEntityTypes call
func (c *Client) GetEntityTypes() (*GetEntityTypesResponse, error) {
r, err := c.sdk.EntityTypes.GetEntityTypes(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllEpisodes wraps the generated openapi.SDK.Episodes.GetAllEpisodes call
func (c *Client) GetAllEpisodes(page *float64) (*GetAllEpisodesResponse, error) {
r, err := c.sdk.Episodes.GetAllEpisodes(c.ctx, page)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetEpisodeBase wraps the generated openapi.SDK.Episodes.GetEpisodeBase call
func (c *Client) GetEpisodeBase(id float64) (*GetEpisodeBaseResponse, error) {
r, err := c.sdk.Episodes.GetEpisodeBase(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetEpisodeExtended wraps the generated openapi.SDK.Episodes.GetEpisodeExtended call
func (c *Client) GetEpisodeExtended(id float64, meta *operations.Meta) (*GetEpisodeExtendedResponse, error) {
r, err := c.sdk.Episodes.GetEpisodeExtended(c.ctx, id, meta)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetEpisodeTranslation wraps the generated openapi.SDK.Episodes.GetEpisodeTranslation call
func (c *Client) GetEpisodeTranslation(id float64, language string) (*GetEpisodeTranslationResponse, error) {
r, err := c.sdk.Episodes.GetEpisodeTranslation(c.ctx, id, language)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllGenders wraps the generated openapi.SDK.Genders.GetAllGenders call
func (c *Client) GetAllGenders() (*GetAllGendersResponse, error) {
r, err := c.sdk.Genders.GetAllGenders(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllGenres wraps the generated openapi.SDK.Genres.GetAllGenres call
func (c *Client) GetAllGenres() (*GetAllGenresResponse, error) {
r, err := c.sdk.Genres.GetAllGenres(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetGenreBase wraps the generated openapi.SDK.Genres.GetGenreBase call
func (c *Client) GetGenreBase(id float64) (*GetGenreBaseResponse, error) {
r, err := c.sdk.Genres.GetGenreBase(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllInspirationTypes wraps the generated openapi.SDK.InspirationTypes.GetAllInspirationTypes call
func (c *Client) GetAllInspirationTypes() (*GetAllInspirationTypesResponse, error) {
r, err := c.sdk.InspirationTypes.GetAllInspirationTypes(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllLanguages wraps the generated openapi.SDK.Languages.GetAllLanguages call
func (c *Client) GetAllLanguages() (*GetAllLanguagesResponse, error) {
r, err := c.sdk.Languages.GetAllLanguages(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllLists wraps the generated openapi.SDK.Lists.GetAllLists call
func (c *Client) GetAllLists(page *float64) (*GetAllListsResponse, error) {
r, err := c.sdk.Lists.GetAllLists(c.ctx, page)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetList wraps the generated openapi.SDK.Lists.GetList call
func (c *Client) GetList(id float64) (*GetListResponse, error) {
r, err := c.sdk.Lists.GetList(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetListBySlug wraps the generated openapi.SDK.Lists.GetListBySlug call
func (c *Client) GetListBySlug(slug string) (*GetListBySlugResponse, error) {
r, err := c.sdk.Lists.GetListBySlug(c.ctx, slug)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetListExtended wraps the generated openapi.SDK.Lists.GetListExtended call
func (c *Client) GetListExtended(id float64) (*GetListExtendedResponse, error) {
r, err := c.sdk.Lists.GetListExtended(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetListTranslation wraps the generated openapi.SDK.Lists.GetListTranslation call
func (c *Client) GetListTranslation(id float64, language string) (*GetListTranslationResponse, error) {
r, err := c.sdk.Lists.GetListTranslation(c.ctx, id, language)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// PostLogin wraps the generated openapi.SDK.Login.PostLogin call
func (c *Client) PostLogin(request operations.PostLoginRequestBody) (*PostLoginResponse, error) {
r, err := c.sdk.Login.PostLogin(c.ctx, request)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllMovie wraps the generated openapi.SDK.Movies.GetAllMovie call
func (c *Client) GetAllMovie(page *float64) (*GetAllMovieResponse, error) {
r, err := c.sdk.Movies.GetAllMovie(c.ctx, page)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetMovieBase wraps the generated openapi.SDK.Movies.GetMovieBase call
func (c *Client) GetMovieBase(id float64) (*GetMovieBaseResponse, error) {
r, err := c.sdk.Movies.GetMovieBase(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetMovieBaseBySlug wraps the generated openapi.SDK.Movies.GetMovieBaseBySlug call
func (c *Client) GetMovieBaseBySlug(slug string) (*GetMovieBaseBySlugResponse, error) {
r, err := c.sdk.Movies.GetMovieBaseBySlug(c.ctx, slug)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetMovieExtended wraps the generated openapi.SDK.Movies.GetMovieExtended call
func (c *Client) GetMovieExtended(id float64, meta *operations.QueryParamMeta, short *bool) (*GetMovieExtendedResponse, error) {
r, err := c.sdk.Movies.GetMovieExtended(c.ctx, id, meta, short)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetMovieTranslation wraps the generated openapi.SDK.Movies.GetMovieTranslation call
func (c *Client) GetMovieTranslation(id float64, language string) (*GetMovieTranslationResponse, error) {
r, err := c.sdk.Movies.GetMovieTranslation(c.ctx, id, language)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetMoviesFilter wraps the generated openapi.SDK.Movies.GetMoviesFilter call
func (c *Client) GetMoviesFilter(request operations.GetMoviesFilterRequest) (*GetMoviesFilterResponse, error) {
r, err := c.sdk.Movies.GetMoviesFilter(c.ctx, request)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllMovieStatuses wraps the generated openapi.SDK.MovieStatuses.GetAllMovieStatuses call
func (c *Client) GetAllMovieStatuses() (*GetAllMovieStatusesResponse, error) {
r, err := c.sdk.MovieStatuses.GetAllMovieStatuses(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllPeople wraps the generated openapi.SDK.People.GetAllPeople call
func (c *Client) GetAllPeople(page *float64) (*GetAllPeopleResponse, error) {
r, err := c.sdk.People.GetAllPeople(c.ctx, page)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetPeopleBase wraps the generated openapi.SDK.People.GetPeopleBase call
func (c *Client) GetPeopleBase(id float64) (*GetPeopleBaseResponse, error) {
r, err := c.sdk.People.GetPeopleBase(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetPeopleExtended wraps the generated openapi.SDK.People.GetPeopleExtended call
func (c *Client) GetPeopleExtended(id float64, meta *operations.GetPeopleExtendedQueryParamMeta) (*GetPeopleExtendedResponse, error) {
r, err := c.sdk.People.GetPeopleExtended(c.ctx, id, meta)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetPeopleTranslation wraps the generated openapi.SDK.People.GetPeopleTranslation call
func (c *Client) GetPeopleTranslation(id float64, language string) (*GetPeopleTranslationResponse, error) {
r, err := c.sdk.People.GetPeopleTranslation(c.ctx, id, language)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllPeopleTypes wraps the generated openapi.SDK.PeopleTypes.GetAllPeopleTypes call
func (c *Client) GetAllPeopleTypes() (*GetAllPeopleTypesResponse, error) {
r, err := c.sdk.PeopleTypes.GetAllPeopleTypes(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSearchResults wraps the generated openapi.SDK.Search.GetSearchResults call
func (c *Client) GetSearchResults(request operations.GetSearchResultsRequest) (*GetSearchResultsResponse, error) {
r, err := c.sdk.Search.GetSearchResults(c.ctx, request)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSearchResultsByRemoteID wraps the generated openapi.SDK.Search.GetSearchResultsByRemoteID call
func (c *Client) GetSearchResultsByRemoteID(remoteID string) (*GetSearchResultsByRemoteIDResponse, error) {
r, err := c.sdk.Search.GetSearchResultsByRemoteID(c.ctx, remoteID)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllSeasons wraps the generated openapi.SDK.Seasons.GetAllSeasons call
func (c *Client) GetAllSeasons(page *float64) (*GetAllSeasonsResponse, error) {
r, err := c.sdk.Seasons.GetAllSeasons(c.ctx, page)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeasonBase wraps the generated openapi.SDK.Seasons.GetSeasonBase call
func (c *Client) GetSeasonBase(id float64) (*GetSeasonBaseResponse, error) {
r, err := c.sdk.Seasons.GetSeasonBase(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeasonExtended wraps the generated openapi.SDK.Seasons.GetSeasonExtended call
func (c *Client) GetSeasonExtended(id float64) (*GetSeasonExtendedResponse, error) {
r, err := c.sdk.Seasons.GetSeasonExtended(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeasonTypes wraps the generated openapi.SDK.Seasons.GetSeasonTypes call
func (c *Client) GetSeasonTypes() (*GetSeasonTypesResponse, error) {
r, err := c.sdk.Seasons.GetSeasonTypes(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllSeries wraps the generated openapi.SDK.Series.GetAllSeries call
func (c *Client) GetAllSeries(page *float64) (*GetAllSeriesResponse, error) {
r, err := c.sdk.Series.GetAllSeries(c.ctx, page)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeriesArtworks wraps the generated openapi.SDK.Series.GetSeriesArtworks call
func (c *Client) GetSeriesArtworks(id float64, lang *string, type_ *int64) (*GetSeriesArtworksResponse, error) {
r, err := c.sdk.Series.GetSeriesArtworks(c.ctx, id, lang, type_)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeriesBase wraps the generated openapi.SDK.Series.GetSeriesBase call
func (c *Client) GetSeriesBase(id float64) (*GetSeriesBaseResponse, error) {
r, err := c.sdk.Series.GetSeriesBase(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeriesBaseBySlug wraps the generated openapi.SDK.Series.GetSeriesBaseBySlug call
func (c *Client) GetSeriesBaseBySlug(slug string) (*GetSeriesBaseBySlugResponse, error) {
r, err := c.sdk.Series.GetSeriesBaseBySlug(c.ctx, slug)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeriesEpisodes wraps the generated openapi.SDK.Series.GetSeriesEpisodes call
func (c *Client) GetSeriesEpisodes(request operations.GetSeriesEpisodesRequest) (*GetSeriesEpisodesResponse, error) {
r, err := c.sdk.Series.GetSeriesEpisodes(c.ctx, request)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeriesExtended wraps the generated openapi.SDK.Series.GetSeriesExtended call
func (c *Client) GetSeriesExtended(id float64, meta *operations.GetSeriesExtendedQueryParamMeta, short *bool) (*GetSeriesExtendedResponse, error) {
r, err := c.sdk.Series.GetSeriesExtended(c.ctx, id, meta, short)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeriesFilter wraps the generated openapi.SDK.Series.GetSeriesFilter call
func (c *Client) GetSeriesFilter(request operations.GetSeriesFilterRequest) (*GetSeriesFilterResponse, error) {
r, err := c.sdk.Series.GetSeriesFilter(c.ctx, request)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeriesNextAired wraps the generated openapi.SDK.Series.GetSeriesNextAired call
func (c *Client) GetSeriesNextAired(id float64) (*GetSeriesNextAiredResponse, error) {
r, err := c.sdk.Series.GetSeriesNextAired(c.ctx, id)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeriesSeasonEpisodesTranslated wraps the generated openapi.SDK.Series.GetSeriesSeasonEpisodesTranslated call
func (c *Client) GetSeriesSeasonEpisodesTranslated(id float64, lang string, page int64, seasonType string) (*GetSeriesSeasonEpisodesTranslatedResponse, error) {
r, err := c.sdk.Series.GetSeriesSeasonEpisodesTranslated(c.ctx, id, lang, page, seasonType)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetSeriesTranslation wraps the generated openapi.SDK.Series.GetSeriesTranslation call
func (c *Client) GetSeriesTranslation(id float64, language string) (*GetSeriesTranslationResponse, error) {
r, err := c.sdk.Series.GetSeriesTranslation(c.ctx, id, language)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllSeriesStatuses wraps the generated openapi.SDK.SeriesStatuses.GetAllSeriesStatuses call
func (c *Client) GetAllSeriesStatuses() (*GetAllSeriesStatusesResponse, error) {
r, err := c.sdk.SeriesStatuses.GetAllSeriesStatuses(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// GetAllSourceTypes wraps the generated openapi.SDK.SourceTypes.GetAllSourceTypes call
func (c *Client) GetAllSourceTypes() (*GetAllSourceTypesResponse, error) {
r, err := c.sdk.SourceTypes.GetAllSourceTypes(c.ctx)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}
// Updates wraps the generated openapi.SDK.Updates.Updates call
func (c *Client) Updates(since int64, action *operations.Action, page *float64, type_ *operations.Type) (*UpdatesResponse, error) {
r, err := c.sdk.Updates.Updates(c.ctx, since, action, page, type_)
if err != nil {
return nil, err
}
if r.StatusCode != 200 {
return nil, errors.Errorf("non-200 response: %d", r.StatusCode)
}
return r.Object, nil
}