This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapi_test.go
101 lines (84 loc) · 2.48 KB
/
api_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
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
package setlistfm
import (
"context"
"fmt"
"testing"
)
const API_KEY = "e1d7b2e5-c3b7-459b-9597-cf5fd9296182"
func TestArtistSetlistsByMBID(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.ArtistSetlistsByMBID(context.TODO(), "65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab", 2)
fmt.Println(res)
}
func TestArtistByMBID(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.ArtistByMBID(context.TODO(), "65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab")
fmt.Println(res)
}
func TestCityByGeoID(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.CityByGeoID(context.TODO(), "5357527")
fmt.Println(res)
}
func TestSearchForArtists(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.SearchForArtists(context.TODO(), ArtistsQuery{ArtistName: "Metallica"})
fmt.Println(res)
//res, _ = SearchForArtists("65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab", "", "", 0)
//fmt.Println(res)
}
func TestSearchForCities(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.SearchForCities(context.TODO(), CityQuery{CountryCode: "PT", Name: "Lisbon"})
fmt.Println(res)
}
func TestListAllCountries(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.ListAllCountries(context.TODO())
fmt.Println(res)
}
func TestSearchForSetlists(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.SearchForSetlists(context.TODO(), SetlistQuery{ArtistName: "Opeth"})
fmt.Println(res)
}
func TestSearchForVenues(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.SearchForVenues(context.TODO(), VenueQuery{CountryCode: "PT"})
fmt.Println(res)
}
func TestSetlistByVersionID(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.SetlistByVersionID(context.TODO(), "7be1aaa0")
fmt.Println(res)
}
func TestSetlistByID(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.SetlistByID(context.TODO(), "63de4613")
fmt.Println(res)
}
func TestUserByID(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.UserByID(context.TODO(), "ExecutiveChimp")
fmt.Println(res)
}
func TestUserAttendedConcerts(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.UserAttendedConcerts(context.TODO(), "ExecutiveChimp", 0)
fmt.Println(res)
}
func TestUserEditedSetlists(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.UserEditedSetlists(context.TODO(), "ExecutiveChimp", 0)
fmt.Println(res)
}
func TestVenueByID(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.VenueByID(context.TODO(), "73d466b5")
fmt.Println(res)
}
func TestVenueSetlists(t *testing.T) {
c := NewClient(API_KEY)
res, _ := c.VenueSetlists(context.TODO(), "73d466b5", 0)
fmt.Println(res)
}