/// <summary> /// Gets the artist popular songs. /// </summary> /// <param name="artistID">The artist identifier.</param> /// <returns>the found songs</returns> public GetSongSearchResults.Result GetArtistPopularSongs(int artistID) { RequestParameters requestParameters = new RequestParameters(); requestParameters.method = "getArtistPopularSongs"; requestParameters.parameters.Add("artistID", artistID); string responseJson = this.ExecuteJson(requestParameters); GetSongSearchResults.ResponseRootObject responseRootObj; if (string.IsNullOrEmpty(responseJson)) { responseRootObj = new GetSongSearchResults.ResponseRootObject(); } else { responseRootObj = this.JsonSerializer.Deserialize <GetSongSearchResults.ResponseRootObject>(responseJson); } return(responseRootObj.result); }
/// <summary> /// Gets the song search results. /// </summary> /// <param name="query">The query.</param> /// <param name="country">The country.</param> /// <param name="limit">The limit.</param> /// <param name="offset">The offset.</param> /// <returns>the request response parameters</returns> public GetSongSearchResults.Result GetSongSearchResults(string query, string country = "Bulgaria", int limit = 10, int offset = 0) { RequestParameters requestParameters = new RequestParameters(); requestParameters.method = "getSongSearchResults"; requestParameters.parameters.Add("query", query); requestParameters.parameters.Add("country", country); requestParameters.parameters.Add("limit", limit); requestParameters.parameters.Add("offset", offset); string responseJson = this.ExecuteJson(requestParameters); GetSongSearchResults.ResponseRootObject responseRootObj; if (string.IsNullOrEmpty(responseJson)) { responseRootObj = new GetSongSearchResults.ResponseRootObject(); } else { responseRootObj = this.JsonSerializer.Deserialize <GetSongSearchResults.ResponseRootObject>(responseJson); } return(responseRootObj.result); }
/// <summary> /// Gets the artist popular songs. /// </summary> /// <param name="artistID">The artist identifier.</param> /// <returns>the found songs</returns> public GetSongSearchResults.Result GetArtistPopularSongs(int artistID) { RequestParameters requestParameters = new RequestParameters(); requestParameters.method = "getArtistPopularSongs"; requestParameters.parameters.Add("artistID", artistID); string responseJson = this.ExecuteJson(requestParameters); GetSongSearchResults.ResponseRootObject responseRootObj; if (string.IsNullOrEmpty(responseJson)) { responseRootObj = new GetSongSearchResults.ResponseRootObject(); } else { responseRootObj = this.JsonSerializer.Deserialize<GetSongSearchResults.ResponseRootObject>(responseJson); } return responseRootObj.result; }
/// <summary> /// Gets the song search results. /// </summary> /// <param name="query">The query.</param> /// <param name="country">The country.</param> /// <param name="limit">The limit.</param> /// <param name="offset">The offset.</param> /// <returns>the request response parameters</returns> public GetSongSearchResults.Result GetSongSearchResults(string query, string country = "Bulgaria", int limit = 10, int offset = 0) { RequestParameters requestParameters = new RequestParameters(); requestParameters.method = "getSongSearchResults"; requestParameters.parameters.Add("query", query); requestParameters.parameters.Add("country", country); requestParameters.parameters.Add("limit", limit); requestParameters.parameters.Add("offset", offset); string responseJson = this.ExecuteJson(requestParameters); GetSongSearchResults.ResponseRootObject responseRootObj; if (string.IsNullOrEmpty(responseJson)) { responseRootObj = new GetSongSearchResults.ResponseRootObject(); } else { responseRootObj = this.JsonSerializer.Deserialize<GetSongSearchResults.ResponseRootObject>(responseJson); } return responseRootObj.result; }