-
Notifications
You must be signed in to change notification settings - Fork 0
/
tvepisodesgroups.go
51 lines (46 loc) · 1.16 KB
/
tvepisodesgroups.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
package wraptmdb
import "github.com/kwangsing3/http_methods_golang"
/*
* The MIT License (MIT)
*
* Copyright (c) kwangsing3
*
* https://github.com/wrapTMDB/wraptmdb_go
*
*/
type tvepisodesgroups struct{}
var TVepisodesgroups tvepisodesgroups
/********************
* 1.GET /tv/episode_group/{id}
* @description Get the details of a TV episode group. Groups support 7 different types which are enumerated as the following:
* 1.Original air date
* 2.Absolute
* 3.DVD
* 4.Digital
* 5.Story arc
* 6.Production
* 7.TV
* @param {number|string} id
* @returns {any} JSON
* @doc https://developers.themoviedb.org/3/tv-episode-groups/get-tv-episode-group-details
********************/
func (t *tvepisodesgroups) GetDetails(id string, language string) interface{} {
var token = c_module.GetToken()
var header = c_module.GetHeader()
var targetURL string = baseURL +
c_module.Route.TV +
c_module.Route.EPISODEGROUPS +
`` + id +
`?api_key=` + token
if language != "" {
targetURL += `&language=` + language
}
if token == "UnitTest_api_key" {
return targetURL
}
var data, _ = http_methods_golang.GET(targetURL, header)
return data
}
/*
1.GET GetDetails
*/