Esempio n. 1
0
        public void FindSetlists_ByArtist_CanFindSetlists()
        {
            var options = new SetlistByArtistSearchOptions() { MbId = "c14b4180-dc87-481e-b17a-64e4150f90f6" };

            var results = _client.FindSetlistsByArtist(options);

            Assert.NotNull(results);
            Assert.NotEmpty(results.Setlists);
            Assert.Equal("Opeth", results.Setlists.First().Artist.Name);
        }
Esempio n. 2
0
        private RestRequest createSetlistByArtistRequest(SetlistByArtistSearchOptions options)
        {
            var request = new RestRequest();
            request.Resource = "artist/{ArtistId}/setlists";

            request.AddUrlSegment("ArtistId", options.MbId);

            if (options.Page.HasValue)
                request.AddParameter("p", options.Page.Value);

            return request;
        }
Esempio n. 3
0
        public SetlistSearchResult FindSetlistsByArtist(SetlistByArtistSearchOptions options)
        {
            var request = createSetlistByArtistRequest(options);

            return executeRequest<SetlistSearchResult>(request);
        }
Esempio n. 4
0
        public void FindSetlistsByArtistAsync(SetlistByArtistSearchOptions options, Action<SetlistSearchResult> callback)
        {
            var request = createSetlistByArtistRequest(options);

            executeRequestAsync<SetlistSearchResult>(request, callback);
        }