Esempio n. 1
0
        //マイリストを移動
        public void MoveMylist(MylistListEntryViewModel source, MylistListViewModel dest)
        {
            string token = GetMylistToken(source.Owner.Group);

            Dictionary<string, string> pair = new Dictionary<string, string>();
            pair["group_id"] = source.Owner.Group.Id;
            pair["target_group_id"] = dest.Group.Id;
            pair["id_list[0][]"] = source.Entry.ItemId;
            pair["token"] = token;

            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, MylistMoveAPI);

            //とりあえずマイリストだったら
            if(source.Owner.Group.Id == "0") {

                request.RequestUri = new Uri(DefListMoveAPI);
            }

            request.Content = new FormUrlEncodedContent(pair);

            var text = NicoNicoWrapperMain.Session.GetAsync(request).Result;

            //移動先がとりあえずマイリストだったら
            if(dest.Group.Id == "0") {

                AddDefMylist(source.Entry.Id, token);
            }
        }
 public PlayListEntryViewModel(MylistListEntryViewModel entry)
 {
     Title = entry.Entry.Title;
     ThumbNailUrl = entry.Entry.ThumbNailUrl;
     VideoUrl = "http://www.nicovideo.jp/watch/" + entry.Entry.Id;
 }
 public PlayListEntryViewModel(MylistListEntryViewModel entry)
 {
     Title        = entry.Entry.Title;
     ThumbNailUrl = entry.Entry.ThumbNailUrl;
     VideoUrl     = "http://www.nicovideo.jp/watch/" + entry.Entry.Id;
 }