/// <summary>
        /// Search for label by name given in <paramref name="query"/>.
        /// </summary>
        /// <returns>List of possible matches</returns>
        public async Task <List <TrackLabelSearchResult> > SearchLabelAsync(string labelName)
        {
            string           query        = string.Format("\"{0}\"", labelName);
            string           url          = GetUrl(URL_QUERYLABEL, Uri.EscapeDataString(query));
            TrackLabelResult searchResult = await DownloadAsync <TrackLabelResult>(url).ConfigureAwait(false);

            if (searchResult == null)
            {
                return(new List <TrackLabelSearchResult>());
            }
            return(searchResult.Results);
        }
Example #2
0
        /// <summary>
        /// Search for label by name given in <paramref name="query"/>.
        /// </summary>
        /// <returns>List of possible matches</returns>
        public List <TrackLabelSearchResult> SearchLabel(string labelName)
        {
            string           query        = string.Format("\"{0}\"", labelName);
            string           url          = GetUrl(URL_QUERYLABEL, Uri.EscapeDataString(query));
            TrackLabelResult searchResult = Download <TrackLabelResult>(url);

            if (searchResult == null)
            {
                return(new List <TrackLabelSearchResult>());
            }
            return(searchResult.Results);
        }