Наследование: Livet.NotificationObject
Пример #1
0
        public static NicoNicoVitaApiMylistData GetMylistData(string mylistId)
        {
            string detail = "0"; //より細かい1も存在
            string result = NicoNicoWrapperMain.GetSession().GetAsync(MylistDataApiUrl + detail + "&group_id=" + mylistId).Result;

            var json     = DynamicJson.Parse(result);
            var response = json.nicovideo_mylistgroup_response;

            NicoNicoVitaApiMylistData ret = new NicoNicoVitaApiMylistData();

            ret.Id                = response.mylistgroup.id;
            ret.UserId            = response.mylistgroup.user_id;
            ret.ViewCount         = response.mylistgroup.view_counter;
            ret.Name              = response.mylistgroup.name;
            ret.Description       = response.mylistgroup.description;
            ret.isPublic          = response.mylistgroup.@public == "1" ? true : false;
            ret.DefaultSort       = int.Parse(response.mylistgroup.default_sort);
            ret.DefaultSortMethod = response.mylistgroup.default_sort_method;
            ret.SortOrder         = int.Parse(response.mylistgroup.sort_order);
            ret.DefaultSortOrder  = response.mylistgroup.default_sort_order;
            ret.IconId            = response.mylistgroup.icon_id;
            ret.UpdateTime        = NicoNicoUtil.DateFromVitaFormatDate(response.mylistgroup.update_time);
            ret.CreateTime        = NicoNicoUtil.DateFromVitaFormatDate(response.mylistgroup.create_time);
            ret.Count             = int.Parse(response.mylistgroup.count);

            NicoNicoVitaApiUserData re = NicoNicoVitaUserApi.GetUserData(ret.UserId);

            ret.UserName = re.Name;

            return(ret);
        }
Пример #2
0
        public static NicoNicoVitaApiMylistData GetMylistData(string mylistId)
        {
            string detail = "0"; //より細かい1も存在
            string result = NicoNicoWrapperMain.Session.GetAsync(MylistDataApiUrl + detail + "&group_id=" + mylistId).Result;

            var json = DynamicJson.Parse(result);
            var response = json.nicovideo_mylistgroup_response;

            NicoNicoVitaApiMylistData ret = new NicoNicoVitaApiMylistData();

            ret.Id = response.mylistgroup.id;
            ret.UserId = response.mylistgroup.user_id;
            ret.ViewCount = response.mylistgroup.view_counter;
            ret.Name = response.mylistgroup.name;
            ret.Description = response.mylistgroup.description;
            ret.isPublic = response.mylistgroup.@public == "1" ? true : false;
            ret.DefaultSort = int.Parse(response.mylistgroup.default_sort);
            ret.DefaultSortMethod = response.mylistgroup.default_sort_method;
            ret.SortOrder = int.Parse(response.mylistgroup.sort_order);
            ret.DefaultSortOrder = response.mylistgroup.default_sort_order;
            ret.IconId = response.mylistgroup.icon_id;
            ret.UpdateTime = NicoNicoUtil.DateFromVitaFormatDate(response.mylistgroup.update_time);
            ret.CreateTime = NicoNicoUtil.DateFromVitaFormatDate(response.mylistgroup.create_time);
            ret.Count = int.Parse(response.mylistgroup.count);

            NicoNicoVitaApiUserData re = NicoNicoVitaUserApi.GetUserData(ret.UserId);
            ret.UserName = re.Name;

            return ret;
        }