예제 #1
0
파일: example_test.go 프로젝트: nyxz/sharky
func ExampleSharky_GetArtistPopularSongs() {
	shrky := sharky.New(KEY, SECRET)
	song := shrky.GetArtistPopularSongs("2")[0]
	fmt.Println(song.SongName)
	fmt.Println(song.ArtistName)
	// // Output: // Too often changes the result
	// House of Jealous Lovers
	// The Rapture
}
예제 #2
0
파일: example_test.go 프로젝트: nyxz/sharky
// This is sample sessionStart, authentication, song retrieve,
// country retrieve (needed for the stream) and
// obtain the stream URL
func ExampleSetUp() *sharky.Sharky {
	if shrky != nil {
		return shrky
	}

	shrky = sharky.New(KEY, SECRET)
	shrky.StartSession()
	shrky.Authenticate(LOGIN, PASSWORD)

	return shrky
}