Last active
February 2, 2021 02:35
-
-
Save eggplants/9ca4e77e302ed2a8f5d79bb99c3c8db0 to your computer and use it in GitHub Desktop.
pixivpyの関数コメント翻訳
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AppPixivAPI(BasePixivAPI): | |
| #公式API(+便利な独自関数)のPythonラッパーとしてのAPI | |
| # ページパラメータ(1, 2,...) | |
| def parse_qs(self, next_url): | |
| # ユーザーの詳細 | |
| def user_detail(self, user_id): | |
| # ユーザーの投稿作品 | |
| def user_illusts(self, user_id, type='illust'): | |
| # ユーザーブックマーク(コレクション)リスト | |
| def user_bookmarks_illust(self, user_id, restrict='public'): | |
| # フォローユーザーの新しい作品 | |
| # restrict: [public, private] | |
| def illust_follow(self, restrict='public'): | |
| # 作品詳細 (login不要,PAPIの方のworksと同じ) | |
| def illust_detail(self, illust_id): | |
| # 関連作品 | |
| def illust_related(self, illust_id): | |
| # リコメンドされたユーザ(おすすめ欄のやつ) | |
| # content_type: [illust, manga] | |
| def illust_recommended(self, content_type='illust'): | |
| # 作品ランキング | |
| # mode: [day, week, month, day_male, day_female, week_original, week_rookie, day_manga] | |
| # date: '2016-08-01' | |
| # mode(認証アカウントで「R18を表示する」設定が必要): [day_r18, day_male_r18, day_female_r18, week_r18, week_r18g] | |
| def illust_ranking(self, mode='day', date=None, offset=None): | |
| # トレンドタグ (Search - tags) | |
| def trending_tags_illust(self): | |
| # 検索 (Search) | |
| # search_target - 検索対象 | |
| # partial_match_for_tags - タグへの部分一致から | |
| # exact_match_for_tags - タグへの完全一致から | |
| # title_and_caption - タイトルと説明文から | |
| # sort: [date_desc, date_asc] | |
| # duration: [within_last_day, within_last_week, within_last_month] | |
| def search_illust(self, word, search_target='partial_match_for_tags', sort='date_desc', duration=None): | |
| # コレクションの詳細 | |
| def illust_bookmark_detail(self, illust_id): | |
| # ブックマーク(コレクション)への追加 | |
| def illust_bookmark_add(self, illust_id, restrict='public', tags=None): | |
| # ブックマーク(コレクション)の削除 | |
| def illust_bookmark_delete(self, illust_id): | |
| # フォロー中のユーザー | |
| def user_bookmark_tags_illust(self, restrict='public', offset=None): | |
| # フォロー中のユーザー | |
| def user_following(self, user_id, restrict='public', offset=None): | |
| # フォロワーユーザー | |
| def user_follower(self, user_id, filter='for_ios', offset=None): | |
| # フレンド | |
| def user_mypixiv(self, user_id, offset=None): | |
| # ブラックリストユーザ | |
| def user_list(self, user_id, filter='for_ios', offset=None): | |
| # うごいら(gif)の情報を取得 | |
| def ugoira_metadata(self, illust_id): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PixivAPI(BasePixivAPI): | |
| #純粋に公式APIのPythonラッパーとしてのAPI | |
| # 個別の作品の詳細 | |
| def works(self, illust_id): | |
| # ユーザ情報 | |
| def users(self, author_id): | |
| # 購読中のフィード | |
| def me_feeds(self, show_r18=1): | |
| # ブックマークした作品 | |
| def me_favorite_works(self,page=1,per_page=50,image_sizes=['px_128x128', 'px_480mw', 'large']): | |
| # 自分のブックマークに作品を追加 | |
| # publicity: public, private | |
| def me_favorite_works_add(self, work_id, publicity='public'): | |
| # 自分のブックマークから作品削除 | |
| def me_favorite_works_delete(self, ids): | |
| # 自分のブックマークにユーザーを追加 | |
| # publicity: public, private | |
| def me_favorite_users_follow(self, user_id, publicity='public'): | |
| # ユーザの投稿作品 | |
| # publicity: public, private | |
| def users_works(self, author_id, page=1, per_page=30, publicity='public'): | |
| # アカウントのブックマークの作品 | |
| # publicity: public, private | |
| def users_favorite_works(self, author_id, page=1, per_page=30, publicity='public'): | |
| # ランキング | |
| # mode: | |
| # daily - 日内で | |
| # weekly - 週内で | |
| # monthly - 月内で | |
| # male - 男性向け | |
| # female - 女性向け | |
| # original - 1次創作 | |
| # rookie - Rookie | |
| # daily_r18 - R18で日内 | |
| # weekly_r18 - R18で週内 | |
| # male_r18 | |
| # female_r18 | |
| # r18g | |
| # page: 1-n | |
| # date: '2015-04-01' | |
| def ranking_all(self, mode='daily', page=1, per_page=50, date=None): | |
| #検索 | |
| # query: 検索文 | |
| # page: 1-n | |
| # mode: | |
| # text - タイトルと説明文 | |
| # tag - タグに部分一致 | |
| # exact_tag - タグに完全一致 | |
| # caption - 説明文 | |
| # period (昇順のみ対応): | |
| # all - 全ての期間内で | |
| # day - 日内で | |
| # week - 週内で | |
| # month - 月内で | |
| # order: | |
| # desc - 新しい順 | |
| # asc - 古い順 | |
| def search_works(self, query, page=1, per_page=30, mode='text', | |
| period='all', order='desc', sort='date'): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment