public IObservable <MusicBrainzRelease> GetLabelReleases(string labelId, MusicBrainzWebInclude include = MusicBrainzWebInclude.none, int?max = default(int?))
        {
            var toInclude = include.GetInclude();
            Func <IRestRequest> getRequest = () => _MusicBrainzWebClient.GetLabelReleasesRequest(labelId, "inc", toInclude);

            return(GenerateFromPaginableWithSize <MusicBrainzRelease, MusicBrainzSearchReleases>(getRequest, max));
        }
Ejemplo n.º 2
0
        public static string GetInclude(this MusicBrainzWebInclude include)
        {
            if (include == MusicBrainzWebInclude.none)
            {
                return(null);
            }

            return(include.ToString().Replace("_", "-").Replace(", ", "+"));
        }
        public async Task <MusicBrainzArtist> GetArtist(string id, CancellationToken token, MusicBrainzWebInclude include = MusicBrainzWebInclude.none)
        {
            var toInclude = include.GetInclude();
            var request   = _MusicBrainzWebClient.GetArtistRequest(id, "inc", toInclude);;

            return(await _MusicBrainzWebClient.Execute <MusicBrainzArtist>(request, token));
        }
 public async Task <MusicBrainzArtist> GetArtist(string id, MusicBrainzWebInclude include = MusicBrainzWebInclude.none)
 {
     return(await GetArtist(id, CancellationToken.None, include));
 }
        public async Task <MusicBrainzReleaseGroup> GetReleaseGroup(string id, CancellationToken token, MusicBrainzWebInclude include = MusicBrainzWebInclude.none)
        {
            var toInclude = include.GetInclude();
            var request   = _MusicBrainzWebClient.GetReleaseGroupRequest(id, "inc", toInclude);;

            return(await _MusicBrainzWebClient.Execute <MusicBrainzReleaseGroup>(request, CancellationToken.None));
        }
 public async Task <MusicBrainzReleaseGroup> GetReleaseGroup(string id, MusicBrainzWebInclude include = MusicBrainzWebInclude.none)
 {
     return(await GetReleaseGroup(id, CancellationToken.None, include));
 }
 public IEnumerable <MusicBrainzRelease> GetLabelReleasesEnumerable(string labelId, MusicBrainzWebInclude include = MusicBrainzWebInclude.none, int?max = default(int?))
 {
     return(GetLabelReleases(labelId, include, max).ToEnumerable());
 }
 public IEnumerable <MusicBrainzRelease> GetArtistReleasesEnumerable(string artistId, MusicBrainzWebInclude include = MusicBrainzWebInclude.none, int?max = null)
 {
     return(GetArtistReleases(artistId, include, max).ToEnumerable());
 }
Ejemplo n.º 9
0
 public void GetImclude_WorksAsExpected(MusicBrainzWebInclude include, string result)
 {
     include.GetInclude().Should().Be(result);
 }