-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathendpoints.go
66 lines (46 loc) · 1.58 KB
/
endpoints.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
package alldebrid
const (
// MagnetURL is the endpoint for the magnet API
magnet = "https://api.alldebrid.com/v4/magnet"
magnetupload = "%s/upload?agent=%s&apikey=%s"
magnetstatus = "%s/status?agent=%s&apikey=%s&id=%s"
magnetdelete = "%s/delete?agent=%s&apikey=%s&id=%s"
magnetrestart = "%s/restart?agent=%s&apikey=%s&id=%s"
magnetinstant = "%s/instant?agent=%s&apikey=%s"
// LinksURL is the endpoint for the link API
links = "https://api.alldebrid.com/v4/link"
linkunlock = "%s/unlock?agent=%s&apikey=%s&link=%s"
linkstreaming = "%s/streaming?agent=%s&apikey=%s&stream=%s&id=%s"
linkdelayed = "%s/delayed?agent=%s&apikey=%s&id=%s"
// Hosts is the endpoint for the hosts API
hosts = "https://api.alldebrid.com/v4/hosts"
hostsall = "%s?agent=%s"
hostsdomains = "%s/domains?agent=%s"
// User is the endpoint for user API
user = "https://api.alldebrid.com/v4/user"
userinfo = "%s?agent=%s&apikey=%s"
// Pin is the endpoint for PIN auth API
pin = "https://api.alldebrid.com/v4/pin"
pinget = "%s/get?agent=%s"
pincheck = "%s/check?agent=%s&check=%s&pin=%s"
)
func getMagnetEndpointRegular() string {
return magnet
}
var getMagnetEndpoint = getMagnetEndpointRegular
func getLinksEndpointRegular() string {
return links
}
var getLinksEndpoint = getLinksEndpointRegular
func getHostsEndpointRegular() string {
return hosts
}
var getHostsEndpoint = getHostsEndpointRegular
func getUserEndpointRegular() string {
return user
}
var getUserEndpoint = getUserEndpointRegular
func getPinEndpointRegular() string {
return pin
}
var getPinEndpoint = getPinEndpointRegular