コード例 #1
0
        public YandexPlaylist GetPlaylistOfDay()
        {
            var request  = GetRequest(_settings.GetPlaylistOfDay());
            var playlist = default(YandexPlaylist);

            using (var response = (HttpWebResponse)request.GetResponse())
            {
                var data      = GetDataFromResponse(response);
                var jPlaylist = data["playlist"];
                playlist = YandexPlaylist.FromJson(jPlaylist);

                _cookies.Add(response.Cookies);
            }

            return(playlist);
        }