Exemple #1
0
        /// <summary>
        /// Safest search.
        /// </summary>
        /// <param name="parameters">Parameters object</param>
        /// <returns></returns>
        public string ArtistSearch(Parameters parameters)
        {
            string artist;

            string urlSuffix = "artist/search?api_key=" + APIKey + parameters.ArtistSearchString() + parameters.ArtistBucketString();
            artist = echo.DownloadString(urlSuffix);
            return artist;
        }
Exemple #2
0
        public string SongProfile(string id, Parameters parameters)
        {
            string urlSuffix = "song/profile?api_key=" + APIKey + query.SongOrTrackId(id)
                               + parameters.ArtistBucketString();
            string json = echo.DownloadString(urlSuffix);

            return(json);
        }
Exemple #3
0
        /// <summary>
        /// Gets the artist profile (or most relevant profile)
        /// </summary>
        /// <param name="search">string of artist name or ID</param>
        /// <param name="bucket">Parameters object (only bucket options are relevant)</param>
        /// <returns>json string</returns>
        public string ArtistProfile(string search, Parameters bucket)
        {
            string     json;
            Parameters bucketProcess = new Parameters();
            string     parameters    = bucketProcess.ArtistBucketString();
            string     urlSuffix     = "artist/profile?api_key=" + APIKey + query.NameOrArtistId(search) + parameters;

            json = echo.DownloadString(urlSuffix);
            return(json);
        }
Exemple #4
0
        /// <summary>
        /// Overload for ArtistSearch; searches for an artist or ID given parameters. Will throw an exception if artist or id parameter is set on Parameters object.
        /// </summary>
        /// <param name="search">String of artist name or ID</param>
        /// <param name="parameters">Parameters object</param>
        /// <returns></returns>
        public string ArtistSearch(string search, Parameters parameters)
        {

            // TODO: Add exception.
            string artist;

            if (search != parameters.artistSearchParameters.name) { parameters.artistSearchParameters.name = null; }
            string urlSuffix = "artist/search?api_key=" + APIKey + query.NameOrArtistId(search) + parameters.ArtistSearchString() + parameters.ArtistBucketString();
            artist = echo.DownloadString(urlSuffix);

            return artist;
        }
Exemple #5
0
        /// <summary>
        /// Gets the top artists for a genre
        /// </summary>
        /// <param name="name">Genre name</param>
        /// <param name="bucket">Artist bucket parameters</param>
        /// <param name="limit">Limit to Rosetta ID.</param>
        /// <returns></returns>
        public string GenreArtists(string name, Parameters bucket, bool limit = false)
        {
            string urlSuffix = "genre/artists?api_key=" + APIKey + "&name=" + name + bucket.ArtistBucketString();

            if (limit == true)
            {
                urlSuffix = urlSuffix + "&limit=true";
            }
            string json = echo.DownloadString(urlSuffix);

            return(json);
        }
Exemple #6
0
        /// <summary>
        /// Top Hott for artists
        /// </summary>
        /// <param name="bucket">Parameters object (only bucket options are relevant)</param>
        /// <returns>json string</returns>
        public string ArtistTopHottt(Parameters bucket)
        {
            // todo: implement genre search

            string     json;
            Parameters bucketProcess = new Parameters();
            string     parameters    = bucketProcess.ArtistBucketString();
            string     urlSuffix     = "artist/top_hottt?api_key=" + APIKey + parameters;

            json = echo.DownloadString(urlSuffix);
            return(json);
        }
Exemple #7
0
 /// <summary>
 /// Gets the top artists for a genre
 /// </summary>
 /// <param name="name">Genre name</param>
 /// <param name="bucket">Artist bucket parameters</param>
 /// <param name="limit">Limit to Rosetta ID.</param>
 /// <returns></returns>
 public string GenreArtists(string name, Parameters bucket, bool limit = false)
 {
     string urlSuffix = "genre/artists?api_key=" + APIKey + "&name=" + name + bucket.ArtistBucketString();
     if (limit == true) { urlSuffix = urlSuffix + "&limit=true"; }
     string json = echo.DownloadString(urlSuffix);
     return json;
 }
Exemple #8
0
 public string SongProfile(string id, Parameters parameters)
 {
     string urlSuffix = "song/profile?api_key=" + APIKey + query.SongOrTrackId(id)
         + parameters.ArtistBucketString();
     string json = echo.DownloadString(urlSuffix);
     return json;
 }
Exemple #9
0
        /// <summary>
        /// Top Hott for artists
        /// </summary>
        /// <param name="bucket">Parameters object (only bucket options are relevant)</param>
        /// <returns>json string</returns>
        public string ArtistTopHottt(Parameters bucket)
        {
            // todo: implement genre search

            string json;
            Parameters bucketProcess = new Parameters();
            string parameters = bucketProcess.ArtistBucketString();
            string urlSuffix = "artist/top_hottt?api_key=" + APIKey + parameters;
            json = echo.DownloadString(urlSuffix);
            return json;
        }
Exemple #10
0
        /// <summary>
        /// Gets the artist profile (or most relevant profile)
        /// </summary>
        /// <param name="search">string of artist name or ID</param>
        /// <param name="bucket">Parameters object (only bucket options are relevant)</param>
        /// <returns>json string</returns>
        public string ArtistProfile(string search, Parameters bucket)
        {
            string json;
            Parameters bucketProcess = new Parameters();
            string parameters = bucketProcess.ArtistBucketString();
            string urlSuffix = "artist/profile?api_key=" + APIKey + query.NameOrArtistId(search) + parameters;

            json = echo.DownloadString(urlSuffix);
            return json;
        }
Exemple #11
0
        /// <summary>
        /// Safest search.
        /// </summary>
        /// <param name="parameters">Parameters object</param>
        /// <returns></returns>
        public string ArtistSearch(Parameters parameters)
        {
            string artist;

            string urlSuffix = "artist/search?api_key=" + APIKey + parameters.ArtistSearchString() + parameters.ArtistBucketString();

            artist = echo.DownloadString(urlSuffix);
            return(artist);
        }
Exemple #12
0
        /// <summary>
        /// Overload for ArtistSearch; searches for an artist or ID given parameters. Will throw an exception if artist or id parameter is set on Parameters object.
        /// </summary>
        /// <param name="search">String of artist name or ID</param>
        /// <param name="parameters">Parameters object</param>
        /// <returns></returns>
        public string ArtistSearch(string search, Parameters parameters)
        {
            // TODO: Add exception.
            string artist;

            if (search != parameters.artistSearchParameters.name)
            {
                parameters.artistSearchParameters.name = null;
            }
            string urlSuffix = "artist/search?api_key=" + APIKey + query.NameOrArtistId(search) + parameters.ArtistSearchString() + parameters.ArtistBucketString();

            artist = echo.DownloadString(urlSuffix);

            return(artist);
        }