generated from oklookat/gostarter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_test.go
52 lines (46 loc) · 801 Bytes
/
main_test.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
package govkm
import (
"os"
"testing"
"time"
"github.com/joho/godotenv"
"github.com/oklookat/govkm/schema"
)
var (
_artistIds = [4]schema.ID{
"13449406",
"19858139",
"16985090",
"16941569",
}
_albumIds = [4]schema.ID{
"23212224",
"23145074",
"22731308",
"22731801",
}
_trackIds = [4]schema.ID{
"2d6e5e50ee1c2480bea4fe093be19fde",
"1b5d1f4fe596e69563fd5d9629dbe286",
"5ad6547c8acbfde7b28f33fce2e4abcd",
"c0644ba88b54fa86341c503446ec1acc",
}
_playlistIds = [4]schema.ID{
"32209597",
"817551217",
"241811439",
"32307949",
}
)
func getClient(t *testing.T) *Client {
err := godotenv.Load()
if err != nil {
t.Fatal(err)
}
cl, err := New(os.Getenv("ACCESS_TOKEN"))
if err != nil {
t.Fatal(err)
}
cl.Http.SetRateLimit(1, time.Second)
return cl
}