Пример #1
0
 public static Task <IllustsPage> GetFollowedUsersIllustAsync(this PixivClient client, Restrict restrict = Restrict.Public, int offset = 0)
 {
     client.RequireAuth();
     return(client.GetAsync <IllustsPage>("/v2/illust/follow", new HttpForm {
         { "restrict", restrict.GetSymbol() }, { "offset", offset.ToString() }
     }));
 }
Пример #2
0
 public static Task DeleteIllustBookmarkAsync(this PixivClient client, IllustID id)
 {
     client.RequireAuth();
     return(client.PostAsync("/v1/illust/bookmark/delete", new HttpForm {
         { "illust_id", id }
     }));
 }
Пример #3
0
 public static Task <BookmarkTagsPage> GetUserBookmarkTagsAsync(this PixivClient client, Restrict restrict = Restrict.Public)
 {
     client.RequireAuth();
     return(client.GetAsync <BookmarkTagsPage>("/v1/user/bookmark-tags/illust", new HttpForm {
         { "restrict", restrict.GetSymbol() }
     }));
 }
Пример #4
0
 // TODO support tag
 public static Task AddIllustBookmarkAsync(this PixivClient client, IllustID id, Restrict restrict = Restrict.Public)
 {
     client.RequireAuth();
     return(client.PostAsync("/v2/illust/bookmark/add", new HttpForm {
         { "illust_id", id }, { "restrict", restrict.GetSymbol() }
     }));
 }
Пример #5
0
        public static Task <RecommendIllustsPage> GetIllustRecommendAsync(this PixivClient client, ContentType type = ContentType.Illust, bool includeRankingIllusts = true)
        {
            client.RequireAuth();
            var url = "/v1/illust/recommended";

            return(client.GetAsync <RecommendIllustsPage>(url, new HttpForm
            {
                { "content_type", type.GetSymbol() },
                { "include_ranking_illusts", includeRankingIllusts.ToString().ToLower() },
                { "include_ranking_label", "true" } // 我就是不给参数 你能奈我何?
            }));
        }