public async Task ReturnsSongFromSlug(string slug) { var apiKey = Environment.GetEnvironmentVariable("BAELOR_TEST_KEY"); var baelorClient = new BaelorClient(apiKey); var song = await baelorClient.Song(slug); Assert.NotNull(song); }
public static async Task GetLyricsToSong(Dictionary <string, string> arguments, Dictionary <string, string> options) { var songSlug = arguments["song"]; var hideTimecodes = options["h"]; var apiKey = options["k"]; var client = new BaelorClient(apiKey); var song = await client.Song(songSlug); WriteLine($"Lyrics for {song.Title}:"); foreach (var lyric in song.Lyrics) { if (hideTimecodes == "f") { Write($"{lyric.TimeCode} - "); } WriteLine($"{lyric.Content}"); } }