Inheritance: Livet.NotificationObject
Exemplo n.º 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);
        }
        public static NicoNicoVitaApiUserData GetUserData(string userId)
        {
            string result = NicoNicoWrapperMain.GetSession().GetAsync(UserDataApiUrl + userId).Result;

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

            NicoNicoVitaApiUserData ret = new NicoNicoVitaApiUserData();

            ret.Id = response.user.id;
            ret.Name = response.user.nickname;
            ret.IconUrl = response.user.thumbnail_url;
            ret.UserSecret = int.Parse(response.vita_option.user_secret);

            return ret;
        }
Exemplo n.º 3
0
        public static NicoNicoVitaApiUserData GetUserData(string userId)
        {
            string result = NicoNicoWrapperMain.GetSession().GetAsync(UserDataApiUrl + userId).Result;

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

            NicoNicoVitaApiUserData ret = new NicoNicoVitaApiUserData();

            ret.Id         = response.user.id;
            ret.Name       = response.user.nickname;
            ret.IconUrl    = response.user.thumbnail_url;
            ret.UserSecret = int.Parse(response.vita_option.user_secret);

            return(ret);
        }