Beispiel #1
0
        /// <summary>
        /// 电台评论
        /// </summary>
        /// <param name="id">节目id,即RadioSongItem,不是MainSong</param>
        /// <returns></returns>
        public static CommentRoot GetRadioComment(long id)
        {
            string result = Http.Get(ConfigService.ApiUri + @"/comment/dj?id=" + id + "&limit=100");

            if (result == null || result.Equals(""))
            {
                return(null);
            }
            try
            {
                return(JsonConvert.DeserializeObject <CommentRoot>(result));
            }
            catch (Exception er) { OtherHelper.ShowContentDialog(er.ToString()); return(null); }
        }
Beispiel #2
0
        /// <summary>
        /// 搜索
        /// </summary>
        /// <param name="keyword">关键词</param>
        /// <param name="type">1: 单曲, 10: 专辑, 100: 歌手, 1000: 歌单</param>
        /// <returns></returns>
        public static SearchRoot SearchClound(string keyword, int type)
        {
            string result = Http.Get(ConfigService.ApiUri + @"/cloudsearch?keywords=" + keyword + "&type=" + type);

            if (result == null || result.Equals(""))
            {
                return(null);
            }
            try
            {
                return(JsonConvert.DeserializeObject <SearchRoot>(result));
            }
            catch (Exception er) { OtherHelper.ShowContentDialog(er.ToString()); return(null); }
        }