Represents an Artist delivered from Last.fm. Inherits from ArtistBase.
Inheritance: ArtistBase
Exemplo n.º 1
0
        public LoadLastFmListDataResult<Event> NextEvents(Artist artist)
        {
            var p1 = new Parameter
            {
                Name = LastFmDataAccess.ParamMethod,
                Value = LastFmDataAccess.MethodArtistGetEvents
            };
            Parameter p2;
            if (string.IsNullOrEmpty(artist.MusicBrainzId))
            {
                p2 = new Parameter
                {
                    Name = LastFmDataAccess.ParamArtist,
                    Value = artist.Name
                };
            }
            else
            {
                p2 = new Parameter
                {
                    Name = LastFmDataAccess.ParamMBID,
                    Value = artist.MusicBrainzId
                };
            }
            var p3 = new Parameter
            {
                Name = LastFmDataAccess.ParamAutocorrect,
                Value = true.ToString()
            };

            return new LoadLastFmListDataResult<Event>(
                SearchStringBuilder(new[] { p1, p2, p3 }),
                "event");
        }
Exemplo n.º 2
0
        public LoadLastFmListDataResult<ArtistBase> SimilarArtists(Artist artist)
        {
            const int limit = 16;
            var p1 = new Parameter
            {
                Name = LastFmDataAccess.ParamMethod,
                Value = LastFmDataAccess.MethodArtistGetSimilar
            };
            Parameter p2;
            if (string.IsNullOrEmpty(artist.MusicBrainzId))
            {
                p2 = new Parameter
                {
                    Name = LastFmDataAccess.ParamArtist,
                    Value = artist.Name
                };
            }
            else
            {
                p2 = new Parameter
                {
                    Name = LastFmDataAccess.ParamMBID,
                    Value = artist.MusicBrainzId
                };
            }
            var p3 = new Parameter
            {
                Name = LastFmDataAccess.ParamAutocorrect,
                Value = true.ToString()
            };
            var p4 = new Parameter
            {
                Name = LastFmDataAccess.ParamLimit,
                Value = limit.ToString()
            };

            return new LoadLastFmListDataResult<ArtistBase>(
                SearchStringBuilder(new[] { p1, p2, p3, p4 }),
                "artist");
        }
Exemplo n.º 3
0
        public LoadLastFmEntityDataResult<Biography> MoreInfo(Artist artist)
        {
            var p1 = new Parameter
            {
                Name = LastFmDataAccess.ParamMethod,
                Value = LastFmDataAccess.MethodArtistGetInfo
            };
            Parameter p2;
            if (string.IsNullOrEmpty(artist.MusicBrainzId))
            {
                p2 = new Parameter
                {
                    Name = LastFmDataAccess.ParamArtist,
                    Value = artist.Name
                };
            }
            else
            {
                p2 = new Parameter
                {
                    Name = LastFmDataAccess.ParamMBID,
                    Value = artist.MusicBrainzId
                };
            }
            var p3 = new Parameter
            {
                Name = LastFmDataAccess.ParamAutocorrect,
                Value = true.ToString()
            };

            return new LoadLastFmEntityDataResult<Biography>(
                SearchStringBuilder(new[] {p1, p2, p3}),
                "bio");
        }