示例#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;
        }
示例#2
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);
        }
示例#3
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;
        }
示例#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);
        }