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 }
// 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 }