public async Task ReturnsAlbumFromSlug(string slug)
        {
            var apiKey       = Environment.GetEnvironmentVariable("BAELOR_TEST_KEY");
            var baelorClient = new BaelorClient(apiKey);
            var album        = await baelorClient.Album(slug);

            Assert.NotNull(album);
        }
Exemple #2
0
        public static async Task GetAlbum(Dictionary <string, string> arguments, Dictionary <string, string> options)
        {
            var albumSlug = arguments["album"];
            var apiKey    = options["k"];

            var client = new BaelorClient(apiKey);
            var album  = await client.Album(albumSlug);

            WriteLine(album.Name);
            WriteLine($"- Produced By: {string.Join(", ", album.Producers)}");
            WriteLine($"- Genres: {string.Join(", ", album.Genres)}");
            WriteLine($"- Released: {album.ReleasedAt.ToString("dd MMM yyyy")}");
            WriteLine($"- Label: {album.Label}");
            WriteLine($"- Length: {album.Length.ToString("c")}");
            WriteLine($"- Songs:");
            foreach (var song in album.Songs)
            {
                WriteLine($"  - {song.Title}");
            }
        }