New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@book000/pixivts

Package Overview
Dependencies
Maintainers
1
Versions
893
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@book000/pixivts - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

330

dist/options.d.ts

@@ -1,269 +0,135 @@

/** 検索対象 */
export type SearchTargets = 'partial_match_for_tags' | 'exact_match_for_tags' | 'title_and_caption' | 'keyword';
/** ソート */
export type SearchSorts = 'date_desc' | 'date_asc' | 'popular_desc';
/** 対象期間 */
export type SearchIllustDurations = 'within_last_day' | 'within_last_week' | 'within_last_month';
/** OSフィルタ */
export type Filters = 'for_ios' | 'for_android';
/** コンテンツタイプ */
export type ContentType = 'illust' | 'manga';
/** 公開範囲 */
export type BookmarkRestrict = 'public' | 'private';
import { GetV1IllustDetailRequest } from './types/endpoints/v1/illust/detail';
import { SnakeToCamel } from 'snake-camel-types';
import { GetV1IllustRecommendedRequest } from './types/endpoints/v1/illust/recommended';
import { GetV1SearchIllustRequest } from './types/endpoints/v1/search/illust';
import { PostV2IllustBookmarkAddRequest } from './types/endpoints/v2/illust/bookmark/add';
import { GetV1IllustSeriesRequest } from './types/endpoints/v1/illust/series';
import { GetV2NovelDetailRequest } from './types/endpoints/v2/novel/detail';
import { GetV1NovelTextRequest } from './types/endpoints/v1/novel/text';
import { GetV1NovelRecommendedRequest } from './types/endpoints/v1/novel/recommended';
import { GetV1SearchNovelRequest } from './types/endpoints/v1/search/novel';
import { GetV2NovelSeriesRequest } from './types/endpoints/v2/novel/series';
import { GetV1UserDetailRequest } from './types/endpoints/v1/user/detail';
/**
* イラスト検索オプション
* 検索対象
*/
export interface SearchIllustOptions {
/**
* 検索ワード
*/
word: string;
/**
* 検索対象
*/
searchTarget?: SearchTargets;
/**
* ソート順
*/
sort?: SearchSorts;
/**
* 対象期間
*/
duration?: SearchIllustDurations;
/**
* 開始日時
*/
startDate?: string;
/**
* 終了日時
*/
endDate?: string;
/**
* OSフィルタ
*/
filter?: Filters;
/**
* オフセット
*/
offset?: number;
export declare enum SearchTarget {
/** タグの部分一致 */
PARTIAL_MATCH_FOR_TAGS = "partial_match_for_tags",
/** タグの完全一致 */
EXACT_MATCH_FOR_TAGS = "exact_match_for_tags",
/** タイトル、またはキャプション(アプリ内では本文) */
TITLE_AND_CAPTION = "title_and_caption",
/** キーワード */
KEYWORD = "keyword"
}
/**
* イラスト詳細取得オプション
* ソート
*/
export interface IllustDetailOptions {
/**
* イラストID
*/
illustId: number;
export declare enum SearchSort {
/** 新しい順 */
DATE_DESC = "date_desc",
/** 古い順 */
DATE_ASC = "date_asc",
/** 人気順 */
POPULAR_DESC = "popular_desc"
}
/**
* おすすめイラスト取得オプション
* 対象期間
*/
export interface RecommendedIllustOptions {
/**
* コンテンツタイプ (illust or manga)
*/
contentType: ContentType;
/**
* ランキングラベルを含めるか
*/
includeRankingLabel?: boolean;
/**
* OSフィルタ
*/
filter?: Filters;
/**
* おすすめイラストの最大ブックマークID (?)
*
* @beta
*/
maxBookmarkIdForRecommend?: number;
/**
* 最近のイラストの最小ブックマークID (?)
*
* @beta
*/
minBookmarkIdForRecentIllust?: number;
/**
* オフセット
*/
offset?: number;
/**
* ランキングイラストを含めるか (?)
*/
includeRankingIllusts?: boolean;
/**
* ブックマーク済みのイラストID
*/
bookmarkIllustIds?: number[];
/**
* プライバシーポリシーを含めるか (?)
*
* @beta
*/
includePrivacyPolicy?: boolean;
export declare enum SearchIllustDuration {
/** 1日以内 */
WITHIN_LAST_DAY = "within_last_day",
/** 1週間以内 */
WITHIN_LAST_WEEK = "within_last_week",
/** 1ヶ月以内 */
WITHIN_LAST_MONTH = "within_last_month"
}
/**
* イラストブックマーク追加オプション
* OSフィルタ
*/
export interface IllustBookmarkAddOptions {
/**
* イラストID
*/
illustId: number;
/**
* 公開範囲
*/
restrict?: BookmarkRestrict;
/**
* タグ
*/
tags?: string[];
export declare enum Filter {
/** iOS */
FOR_IOS = "for_ios",
/** Android */
FOR_ANDROID = "for_android"
}
export interface IllustSeriesOptions {
/**
* イラストシリーズID
*/
illustSeriesId: number;
/**
* OSフィルタ
*/
filter?: Filters;
/**
* オフセット
*/
offset?: number;
/**
* ブックマーク公開範囲
*/
export declare enum BookmarkRestrict {
/** 公開 */
PUBLIC = "public",
/** 非公開 */
PRIVATE = "private"
}
/**
* オブジェクトの一部を必須にする
*
* @see https://qiita.com/yuu_1st/items/71c4fc9cc95a72fa4df9
*/
type SomeRequired<T, K extends keyof T> = T & {
[P in K]-?: T[P];
};
/**
* オブジェクトの特定プロパティを上書きする
*
* @see https://qiita.com/ibaragi/items/2a6412aeaca5703694b1
*/
type Overwrite<T, U extends {
[Key in keyof T]?: unknown;
}> = Omit<T, keyof U> & U;
/**
* イラスト検索オプション
*/
export type SearchIllustOptions = SomeRequired<SnakeToCamel<GetV1SearchIllustRequest>, 'word'>;
/**
* イラスト詳細取得オプション
*/
export type IllustDetailOptions = SnakeToCamel<GetV1IllustDetailRequest>;
/**
* おすすめイラスト取得オプション
*/
export type RecommendedIllustOptions = SnakeToCamel<Partial<GetV1IllustRecommendedRequest>>;
/**
* イラストブックマーク追加オプション
*/
export type IllustBookmarkAddOptions = SomeRequired<SnakeToCamel<PostV2IllustBookmarkAddRequest>, 'illustId'>;
/**
* イラストシリーズ取得オプション
*/
export type IllustSeriesOptions = SomeRequired<SnakeToCamel<GetV1IllustSeriesRequest>, 'illustSeriesId'>;
/**
* 小説詳細取得オプション
*/
export interface NovelDetailOptions {
/**
* 小説ID
*/
novelId: number;
}
export type NovelDetailOptions = SnakeToCamel<GetV2NovelDetailRequest>;
/**
* 小説本文取得オプション
*/
export interface NovelTextOptions {
/**
* 小説ID
*/
novelId: number;
}
export type NovelTextOptions = SnakeToCamel<GetV1NovelTextRequest>;
/**
* 小説検索オプション
*/
export interface SearchNovelOptions {
/**
* 検索ワード
*/
word: string;
/**
* 検索対象
*/
searchTarget?: SearchTargets;
/**
* ソート順
*/
sort?: SearchSorts;
/**
* プレーンキーワード検索結果をマージするか (?)
*
* @beta
*/
mergePlainKeywordResults?: boolean;
/**
* 翻訳タグ検索結果を含むか
*/
includeTranslatedTagResults?: boolean;
/**
* 開始日時
*/
startDate?: string;
/**
* 終了日時
*/
endDate?: string;
/**
* OSフィルタ
*/
filter?: Filters;
/**
* オフセット
*/
offset?: number;
}
export type SearchNovelOptions = SomeRequired<SnakeToCamel<GetV1SearchNovelRequest>, 'word'>;
/**
* おすすめ小説取得オプション
*/
export interface RecommendedNovelOptions {
export type RecommendedNovelOptions = Overwrite<SnakeToCamel<Partial<GetV1NovelRecommendedRequest>>, {
/**
* ランキングラベルを含めるか
*/
includeRankingLabel?: boolean;
/**
* OSフィルタ
*/
filter?: Filters;
/**
* オフセット
*/
offset?: number;
/**
* ランキング小説を含めるか (?)
* すでにおすすめした小説ID群 (?)
*
* @default undefined
* @beta
*/
includeRankingNovels?: boolean;
/**
* おすすめ済みの小説ID
*/
alreadyRecommended?: number[];
/**
* おすすめ小説の最大ブックマークID (?)
*
* @beta
*/
maxBookmarkIdForRecommend?: number;
/**
* プライバシーポリシーを含めるか (?)
*
* @beta
*/
includePrivacyPolicy?: boolean;
}
}>;
/**
* 小説シリーズ詳細取得オプション
*/
export interface NovelSeriesOptions {
/**
* 小説シリーズID
*/
seriesId: number;
/**
* OSフィルタ
*/
filter?: Filters;
/**
* (?)
*
* @beta
*/
lastOrder?: string;
}
export type NovelSeriesOptions = SomeRequired<SnakeToCamel<GetV2NovelSeriesRequest>, 'seriesId'>;
/**
* ユーザー詳細取得オプション
*/
export interface UserDetailOptions {
/**
* ユーザーID
*/
userId: number;
/**
* OSフィルタ
*/
filter?: Filters;
}
export type UserDetailOptions = SnakeToCamel<GetV1UserDetailRequest>;
export {};
//# sourceMappingURL=options.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BookmarkRestrict = exports.Filter = exports.SearchIllustDuration = exports.SearchSort = exports.SearchTarget = void 0;
/**
* 検索対象
*/
var SearchTarget;
(function (SearchTarget) {
/** タグの部分一致 */
SearchTarget["PARTIAL_MATCH_FOR_TAGS"] = "partial_match_for_tags";
/** タグの完全一致 */
SearchTarget["EXACT_MATCH_FOR_TAGS"] = "exact_match_for_tags";
/** タイトル、またはキャプション(アプリ内では本文) */
SearchTarget["TITLE_AND_CAPTION"] = "title_and_caption";
/** キーワード */
SearchTarget["KEYWORD"] = "keyword";
})(SearchTarget = exports.SearchTarget || (exports.SearchTarget = {}));
/**
* ソート
*/
var SearchSort;
(function (SearchSort) {
/** 新しい順 */
SearchSort["DATE_DESC"] = "date_desc";
/** 古い順 */
SearchSort["DATE_ASC"] = "date_asc";
/** 人気順 */
SearchSort["POPULAR_DESC"] = "popular_desc";
})(SearchSort = exports.SearchSort || (exports.SearchSort = {}));
/**
* 対象期間
*/
var SearchIllustDuration;
(function (SearchIllustDuration) {
/** 1日以内 */
SearchIllustDuration["WITHIN_LAST_DAY"] = "within_last_day";
/** 1週間以内 */
SearchIllustDuration["WITHIN_LAST_WEEK"] = "within_last_week";
/** 1ヶ月以内 */
SearchIllustDuration["WITHIN_LAST_MONTH"] = "within_last_month";
})(SearchIllustDuration = exports.SearchIllustDuration || (exports.SearchIllustDuration = {}));
/**
* OSフィルタ
*/
var Filter;
(function (Filter) {
/** iOS */
Filter["FOR_IOS"] = "for_ios";
/** Android */
Filter["FOR_ANDROID"] = "for_android";
})(Filter = exports.Filter || (exports.Filter = {}));
/**
* ブックマーク公開範囲
*/
var BookmarkRestrict;
(function (BookmarkRestrict) {
/** 公開 */
BookmarkRestrict["PUBLIC"] = "public";
/** 非公開 */
BookmarkRestrict["PRIVATE"] = "private";
})(BookmarkRestrict = exports.BookmarkRestrict || (exports.BookmarkRestrict = {}));
//# sourceMappingURL=options.js.map

@@ -6,12 +6,14 @@ /// <reference types="node" />

import { IllustDetailOptions, SearchIllustOptions, RecommendedIllustOptions, IllustBookmarkAddOptions, NovelDetailOptions, SearchNovelOptions, RecommendedNovelOptions, NovelSeriesOptions, UserDetailOptions, IllustSeriesOptions, NovelTextOptions } from './options';
import { PixivApiError } from './types/error-response';
import { GetV1IllustDetailResponse } from './types/endpoints/v1/illust/detail';
import { GetV1SearchIllustResponse } from './types/endpoints/v1/search/illust';
import { GetV1IllustRecommendedResponse } from './types/endpoints/v1/illust/recommended';
import { PostV2IllustBookmarkAddResponse } from './types/endpoints/v2/illust/bookmark/add';
import { GetV1IllustDetailResponse } from './types/endpoints/v1/illust/detail';
import { GetV1IllustSeriesResponse } from './types/endpoints/v1/illust/series';
import { GetV2NovelDetailResponse } from './types/endpoints/v2/novel/detail';
import { GetV1RecommendedNovelResponse } from './types/endpoints/v1/novel/recommended';
import { GetV1SearchIllustResponse } from './types/endpoints/v1/search/illust';
import { GetV1NovelTextResponse } from './types/endpoints/v1/novel/text';
import { GetV1SearchNovelResponse } from './types/endpoints/v1/search/novel';
import { GetV1NovelRecommendedResponse } from './types/endpoints/v1/novel/recommended';
import { GetV2NovelSeriesResponse } from './types/endpoints/v2/novel/series';
import { GetV1UserDetailResponse } from './types/endpoints/v1/user/detail';
import { GetV1NovelTextResponse } from './types/endpoints/v1/novel/text';
import { PixivApiError } from './types/error-response';
import { GetV1RecommendedIllustResponse } from './types/endpoints/v1/illust/recommended';
/**

@@ -44,2 +46,5 @@ * pixiv API

static of(refreshToken: string): Promise<Pixiv>;
/**
* 画像のaxiosストリームを取得する。
*/
static getAxiosImageStream(url: string): Promise<AxiosResponse<ReadStream, any>>;

@@ -66,3 +71,3 @@ /**

*/
recommendedIllust(options: RecommendedIllustOptions): Promise<AxiosResponse<GetV1RecommendedIllustResponse, any>>;
recommendedIllust(options?: RecommendedIllustOptions): Promise<AxiosResponse<GetV1IllustRecommendedResponse, any>>;
/**

@@ -81,3 +86,3 @@ * イラストをブックマークする。

*/
illustSeries(options: IllustSeriesOptions): Promise<AxiosResponse<import(".").PixivIllustSeriesItem, any>>;
illustSeries(options: IllustSeriesOptions): Promise<AxiosResponse<GetV1IllustSeriesResponse, any>>;
/**

@@ -111,3 +116,3 @@ * 小説の詳細情報を取得する。

*/
recommendedNovel(options?: RecommendedNovelOptions): Promise<AxiosResponse<GetV1RecommendedNovelResponse, any>>;
recommendedNovel(options?: RecommendedNovelOptions): Promise<AxiosResponse<GetV1NovelRecommendedResponse, any>>;
/**

@@ -119,3 +124,3 @@ * 小説シリーズの詳細情報を取得する。

*/
novelSeries(options: NovelSeriesOptions): Promise<AxiosResponse<import(".").PixivNovelSeriesItem, any>>;
novelSeries(options: NovelSeriesOptions): Promise<AxiosResponse<GetV2NovelSeriesResponse, any>>;
/**

@@ -152,2 +157,4 @@ * ユーザーの詳細情報を取得する。

*
* ジェネリクスの順番は、T: リクエスト、U: レスポンス。
*
* @param options オプション

@@ -157,3 +164,14 @@ * @returns レスポンス

private request;
/**
* 必須のオプションが含まれているかどうかをチェックする。
*
* @param options オプション
* @param required 必須のオプションキー
*/
private checkRequiredOptions;
/**
* スネークケースのオブジェクトキーをキャメルケースなオブジェクトキーに変換する。
*/
private convertSnakeToCamel;
}
//# sourceMappingURL=pixiv.d.ts.map

@@ -9,2 +9,3 @@ "use strict";

const qs_1 = __importDefault(require("qs"));
const options_1 = require("./options");
/**

@@ -52,4 +53,4 @@ * pixiv API

'app-os': 'ios',
'app-os-version': '14.6',
'user-agent': 'PixivIOSApp/7.13.3 (iOS 14.6; iPhone13,2)',
'app-os-version': '16.4.1',
'user-agent': ' PixivIOSApp/7.16.9 (iOS 16.4.1; iPad13,4)',
header: 'application/x-www-form-urlencoded',

@@ -79,2 +80,5 @@ };

}
/**
* 画像のaxiosストリームを取得する。
*/
static async getAxiosImageStream(url) {

@@ -97,2 +101,3 @@ return axios_1.default.get(url, {

const parameters = {
...this.convertSnakeToCamel(options),
illust_id: options.illustId,

@@ -113,11 +118,14 @@ };

async searchIllust(options) {
this.checkRequiredOptions(options, ['word']);
const parameters = {
...this.convertSnakeToCamel(options),
word: options.word,
searchTarget: options.searchTarget || 'partial_match_for_tags',
sort: options.sort || 'date_desc',
duration: options.duration,
startDate: options.startDate,
endDate: options.endDate,
filter: options.filter || 'for_ios',
search_target: options.searchTarget || options_1.SearchTarget.PARTIAL_MATCH_FOR_TAGS,
sort: options.sort || options_1.SearchSort.DATE_DESC,
start_date: options.startDate,
end_date: options.endDate,
filter: options.filter || options_1.Filter.FOR_IOS,
offset: options.offset,
merge_plain_keyword_results: options.mergePlainKeywordResults || true,
include_translated_tag_results: options.includeTranslatedTagResults || true,
};

@@ -136,15 +144,11 @@ return this.request({

*/
async recommendedIllust(options) {
async recommendedIllust(options = {}) {
const parameters = {
content_type: options.contentType,
include_ranking_label: options.includeRankingLabel || true,
filter: options.filter || 'for_ios',
...this.convertSnakeToCamel(options),
filter: options.filter || options_1.Filter.FOR_IOS,
include_ranking_illusts: options.includeRankingIllusts || true,
min_bookmark_id_for_recent_illust: options.minBookmarkIdForRecentIllust || undefined,
max_bookmark_id_for_recommend: options.maxBookmarkIdForRecommend || undefined,
min_bookmark_id_for_recent_illust: options.minBookmarkIdForRecentIllust || undefined,
offset: options.offset || undefined,
include_ranking_illusts: options.includeRankingIllusts || undefined,
bookmark_illust_ids: options.bookmarkIllustIds
? options.bookmarkIllustIds.join(',')
: undefined,
include_privacy_policy: options.includePrivacyPolicy || undefined,
include_privacy_policy: options.includePrivacyPolicy || true,
};

@@ -164,6 +168,8 @@ return this.request({

async illustBookmarkAdd(options) {
this.checkRequiredOptions(options, ['illustId']);
const data = {
...this.convertSnakeToCamel(options),
illust_id: options.illustId,
restrict: options.restrict || 'public',
'tags[]': (options.tags || []).join(' '),
restrict: options.restrict || options_1.BookmarkRestrict.PUBLIC,
// 'tags[]': (options.tags || []).join(' '),
};

@@ -183,6 +189,8 @@ return this.request({

async illustSeries(options) {
this.checkRequiredOptions(options, ['illustSeriesId']);
const parameters = {
...this.convertSnakeToCamel(options),
illust_series_id: options.illustSeriesId,
filter: options.filter || 'for_ios',
offset: options.offset,
filter: options.filter || options_1.Filter.FOR_IOS,
// offset: options.offset,
};

@@ -202,3 +210,5 @@ return this.request({

async novelDetail(options) {
this.checkRequiredOptions(options, ['novelId']);
const parameters = {
...this.convertSnakeToCamel(options),
novel_id: options.novelId,

@@ -220,3 +230,5 @@ };

async novelText(options) {
this.checkRequiredOptions(options, ['novelId']);
const parameters = {
...this.convertSnakeToCamel(options),
novel_id: options.novelId,

@@ -237,12 +249,14 @@ };

async searchNovel(options) {
this.checkRequiredOptions(options, ['word']);
const parameters = {
...this.convertSnakeToCamel(options),
word: options.word,
searchTarget: options.searchTarget || 'partial_match_for_tags',
sort: options.sort || 'date_desc',
merge_plain_keyword_results: options.mergePlainKeywordResults || true,
include_translated_tag_results: options.includeTranslatedTagResults || true,
search_target: options.searchTarget || options_1.SearchTarget.PARTIAL_MATCH_FOR_TAGS,
sort: options.sort || options_1.SearchSort.DATE_DESC,
startDate: options.startDate,
endDate: options.endDate,
filter: options.filter || 'for_ios',
filter: options.filter || options_1.Filter.FOR_IOS,
offset: options.offset,
merge_plain_keyword_results: options.mergePlainKeywordResults || true,
include_translated_tag_results: options.includeTranslatedTagResults || true,
};

@@ -263,6 +277,5 @@ return this.request({

const parameters = {
include_ranking_label: options.includeRankingLabel || true,
filter: options.filter || 'for_ios',
offset: options.offset || undefined,
include_ranking_novels: options.includeRankingNovels || undefined,
...this.convertSnakeToCamel(options),
// filter: options.filter || 'for_ios',
include_ranking_novels: options.includeRankingNovels || true,
already_recommended: options.alreadyRecommended

@@ -272,3 +285,4 @@ ? options.alreadyRecommended.join(',')

max_bookmark_id_for_recommend: options.maxBookmarkIdForRecommend || undefined,
include_privacy_policy: options.includePrivacyPolicy || undefined,
offset: options.offset || undefined,
include_privacy_policy: options.includePrivacyPolicy || true,
};

@@ -288,5 +302,7 @@ return this.request({

async novelSeries(options) {
this.checkRequiredOptions(options, ['seriesId']);
const parameters = {
...this.convertSnakeToCamel(options),
series_id: options.seriesId,
filter: options.filter || 'for_ios',
// filter: options.filter || 'for_ios',
last_order: options.lastOrder || undefined,

@@ -307,5 +323,7 @@ };

async userDetail(options) {
this.checkRequiredOptions(options, ['userId']);
const parameters = {
...this.convertSnakeToCamel(options),
user_id: options.userId,
filter: options.filter || 'for_ios',
filter: options.filter || options_1.Filter.FOR_IOS,
};

@@ -356,2 +374,4 @@ return this.request({

*
* ジェネリクスの順番は、T: リクエスト、U: レスポンス。
*
* @param options オプション

@@ -362,3 +382,5 @@ * @returns レスポンス

if (options.method === 'GET') {
return this.axios.get(options.path, { params: options.params });
return this.axios.get(options.path, {
params: options.params,
});
}

@@ -374,2 +396,26 @@ if (options.method === 'POST') {

}
/**
* 必須のオプションが含まれているかどうかをチェックする。
*
* @param options オプション
* @param required 必須のオプションキー
*/
checkRequiredOptions(options, required) {
for (const key of required) {
if (options[key] === undefined) {
throw new Error(`Missing required option: ${key}`);
}
}
}
/**
* スネークケースのオブジェクトキーをキャメルケースなオブジェクトキーに変換する。
*/
convertSnakeToCamel(object) {
const result = {};
for (const key of Object.keys(object)) {
const camelKey = key.replace(/_([a-z])/g, (m) => m[1].toUpperCase());
result[camelKey] = object[key];
}
return result;
}
}

@@ -376,0 +422,0 @@ Pixiv.clientId = 'MOBrBDS8blbauoSck0ZfDbtuzpyT';

import { PixivIllustItem } from '../../../pixiv-illust';
/**
* GET /v1/illust/detail のリクエスト
*/
export interface GetV1IllustDetailRequest {
/**
* イラストID
*/
illust_id: number;
}
/**
* GET /v1/illust/detail のレスポンス

@@ -4,0 +13,0 @@ */

import { PixivIllustItem } from '../../../pixiv-illust';
import { Filter } from '../../../../options';
import { PrivacyPolicy } from '../../../pixiv-common';
/**
* GET /v1/illust/recommended のリクエスト
*/
export interface GetV1IllustRecommendedRequest {
/**
* OSフィルタ
*
* @default 'for_ios'
*/
filter: Filter;
/**
* ランキングイラストを含めるか (?)
*
* @default true
* @beta
*/
include_ranking_illusts: boolean;
/**
* 最近のイラストの最小ブックマークID (?)
*
* @default undefined
* @beta
*/
min_bookmark_id_for_recent_illust?: number;
/**
* おすすめイラストの最大ブックマークID (?)
*
* @default undefined
* @beta
*/
max_bookmark_id_for_recommend?: number;
/**
* オフセット
*
* @default undefined
*/
offset?: string;
/**
* プライバシーポリシーを含めるか (?)
*
* @default true
* @beta
*/
include_privacy_policy: boolean;
}
/**
* GET /v1/illust/recommended のレスポンス
*/
export interface GetV1RecommendedIllustResponse {
export interface GetV1IllustRecommendedResponse {
/**

@@ -11,9 +58,9 @@ * おすすめのイラスト群

/**
* 不明
* ランキングのイラスト群?
*
* @beta
*/
ranking_illusts: unknown[];
ranking_illusts: PixivIllustItem[];
/**
* 不明
* コンテストが存在するか?
*

@@ -24,7 +71,5 @@ * @beta

/**
* 不明
*
* @beta
* プライバシーポリシー
*/
privacy_policy: unknown;
privacy_policy?: PrivacyPolicy[];
/**

@@ -31,0 +76,0 @@ * 次回のリクエストに使用する URL。

@@ -1,6 +0,40 @@

import { PixivIllustSeriesItem } from '../../../pixiv-illust-series';
import { PixivIllustItem } from '../../../pixiv-illust';
import { IllustSeriesDetail } from '../../../pixiv-illust-series';
import { Filter } from '../../../../options';
/**
* GET /v1/illust/series のリクエスト
*/
export interface GetV1IllustSeriesRequest {
/**
* イラストシリーズID
*/
illust_series_id: string;
/**
* OSフィルタ
*
* @default 'for_ios'
*/
filter: Filter;
}
/**
* GET /v1/illust/series のレスポンス
*/
export type GetV1IllustSeriesResponse = PixivIllustSeriesItem;
export interface GetV1IllustSeriesResponse {
/**
* シリーズ詳細
*/
illust_series_detail: IllustSeriesDetail;
/**
* シリーズの最初のイラスト
*/
illust_series_first_illust: PixivIllustItem;
/**
* シリーズに含まれているイラスト群
*/
illusts: PixivIllustItem[];
/**
* 次 URL
*/
next_url: string | null;
}
//# sourceMappingURL=series.d.ts.map

@@ -0,6 +1,46 @@

import { PrivacyPolicy } from '../../../pixiv-common';
import { PixivNovelItem } from '../../../pixiv-novel';
/**
* GET /v1/novel/recommended のリクエスト
*/
export interface GetV1NovelRecommendedRequest {
/**
* ランキング小説を含めるか (?)
*
* @default true
* @beta
*/
include_ranking_novels: boolean;
/**
* すでにおすすめした小説ID群。カンマ区切り (?)
*
* @default undefined
* @beta
*/
already_recommended?: string;
/**
* おすすめイラストの最大ブックマークID (?)
*
* @default undefined
* @beta
*/
max_bookmark_id_for_recommend?: number;
/**
* オフセット
*
* @default undefined
*/
offset?: number;
/**
* プライバシーポリシーを含めるか (?)
*
* @default true
* @beta
*/
include_privacy_policy: boolean;
}
/**
* GET /v1/novel/recommended のレスポンス
*/
export interface GetV1RecommendedNovelResponse {
export interface GetV1NovelRecommendedResponse {
/**

@@ -11,13 +51,11 @@ * おすすめの小説群

/**
* 不明
* ランキングの小説群?
*
* @beta
*/
ranking_novels: unknown[];
ranking_novels: PixivNovelItem[];
/**
* 不明
*
* @beta
* プライバシーポリシー
*/
privacy_policy: unknown;
privacy_policy?: PrivacyPolicy[];
/**

@@ -24,0 +62,0 @@ * 次回のリクエストに使用する URL。

import { PixivNovelSeriesItem } from '../../../pixiv-novel-series';
/**
* GET /v1/novel/text のリクエスト
*/
export interface GetV1NovelTextRequest {
/**
* 小説ID
*/
novel_id: number;
}
/**
* GET /v1/novel/text のレスポンス

@@ -4,0 +13,0 @@ */

import { PixivIllustItem } from '../../../pixiv-illust';
import { Filter, SearchSort, SearchTarget } from '../../../../options';
/**
* GET /v1/search/illust のリクエスト
*/
export interface GetV1SearchIllustRequest {
/**
* 検索ワード
*/
word: string;
/**
* 検索対象
*
* @default 'partial_match_for_tags'
*/
search_target: SearchTarget;
/**
* ソート順
*
* @default 'date_desc'
*/
sort: SearchSort;
/**
* 開始日時
*
* @default undefined
*/
start_date?: string;
/**
* 終了日時
*
* @default undefined
*/
end_date?: string;
/**
* OSフィルタ
*
* @default 'for_ios'
*/
filter?: Filter;
/**
* オフセット
*
* @default undefined
*/
offset?: number;
/**
* プレーンキーワード検索結果をマージするか (?)
*
* @default true
* @beta
*/
merge_plain_keyword_results: boolean;
/**
* 翻訳タグ検索結果を含むか
*
* @default true
* @beta
*/
include_translated_tag_results: boolean;
}
/**
* GET /v1/search/illust のレスポンス

@@ -15,6 +75,8 @@ */

*/
next_url: string;
next_url: string | null;
/**
* 不明
*
* 「31536000」固定?1年間?
*
* @beta

@@ -21,0 +83,0 @@ */

@@ -0,3 +1,63 @@

import { Filter, SearchSort, SearchTarget } from '../../../../options';
import { PixivNovelItem } from '../../../pixiv-novel';
/**
* GET /v1/search/novel のリクエスト
*/
export interface GetV1SearchNovelRequest {
/**
* 検索ワード
*/
word: string;
/**
* 検索対象
*
* @default 'partial_match_for_tags'
*/
search_target: SearchTarget;
/**
* ソート順
*
* @default 'date_desc'
*/
sort: SearchSort;
/**
* 開始日時
*
* @default undefined
*/
start_date?: string;
/**
* 終了日時
*
* @default undefined
*/
end_date?: string;
/**
* OSフィルタ
*
* @default 'for_ios'
*/
filter?: Filter;
/**
* オフセット
*
* @default undefined
*/
offset?: number;
/**
* プレーンキーワード検索結果をマージするか (?)
*
* @default true
* @beta
*/
merge_plain_keyword_results: boolean;
/**
* 翻訳タグ検索結果を含むか
*
* @default true
* @beta
*/
include_translated_tag_results: boolean;
}
/**
* GET /v1/search/novel のレスポンス

@@ -10,3 +70,17 @@ */

novels: PixivNovelItem[];
/**
* 次回のリクエストに使用する URL。
*
* @see {Pixiv.parseQueryString}
*/
next_url: string | null;
/**
* 不明
*
* 「31536000」固定?1年間?
*
* @beta
*/
search_span_limit: number;
}
//# sourceMappingURL=novel.d.ts.map
import { PixivUserItem, PixivUserProfile, PixivUserProfilePublicity, PixivUserProfileWorkspace } from '../../../pixiv-user';
import { Filter } from '../../../../options';
/**
* GET /v1/user/detail のリクエスト
*/
export interface GetV1UserDetailRequest {
/**
* ユーザーID
*/
user_id: number;
/**
* OSフィルタ
*
* @default 'for_ios'
*/
filter?: Filter;
}
/**
* GET /v1/user/detail のレスポンス

@@ -4,0 +20,0 @@ */

@@ -0,2 +1,21 @@

import { BookmarkRestrict } from '../../../../../options';
/**
* POST /v2/illust/bookmark/add のリクエスト
*/
export interface PostV2IllustBookmarkAddRequest {
/**
* イラストID
*/
illust_id: number;
/**
* 公開設定
*
* public: 公開
* private: 非公開
*
* @default BookmarkRestrict.Public
*/
restrict: BookmarkRestrict;
}
/**
* POST /v2/illust/bookmark/add のレスポンス

@@ -3,0 +22,0 @@ */

import { PixivNovelItem } from '../../../pixiv-novel';
/**
* GET /v2/novel/detail のリクエスト
*/
export interface GetV2NovelDetailRequest {
/**
* 小説ID
*/
novel_id: number;
}
/**
* GET /v2/novel/detail のレスポンス

@@ -4,0 +13,0 @@ */

@@ -1,6 +0,44 @@

import { PixivNovelSeriesItem } from '../../../pixiv-novel-series';
import { PixivNovelItem } from '../../../pixiv-novel';
import { NovelSeriesDetail } from '../../../pixiv-novel-series';
/**
* GET /v2/novel/series のリクエスト
*/
export interface GetV2NovelSeriesRequest {
/**
* 小説シリーズID
*/
series_id: number;
/**
* ?
*
* @default undefined
* @beta
*/
last_order?: string;
}
/**
* GET /v2/novel/series のレスポンス
*/
export type GetV2NovelSeriesResponse = PixivNovelSeriesItem;
export interface GetV2NovelSeriesResponse {
/**
* シリーズ詳細
*/
novel_series_detail: NovelSeriesDetail;
/**
* シリーズの1個目の小説データ
*/
novel_series_first_novel: PixivNovelItem;
/**
* シリーズの最新の小説データ
*/
novel_series_latest_novel: PixivNovelItem;
/**
* シリーズにある小説一覧
*/
novels: PixivNovelItem[];
/**
* 次 URL
*/
next_url: string | null;
}
//# sourceMappingURL=series.d.ts.map
interface Error {
/**
* ユーザ向けのエラーメッセージ
*/
user_message: string;
/**
* エラーメッセージ
*/
message: string;
/**
* エラーの原因
*/
reason: string;
/**
* ユーザ向けのエラーメッセージ詳細
*/
user_message_details: unknown;

@@ -6,0 +18,0 @@ }

@@ -44,3 +44,3 @@ /**

/** アクセスをブロックしているユーザーであるか */
is_access_blocking_user: boolean;
is_access_blocking_user?: boolean;
}

@@ -67,2 +67,16 @@ /**

}
export interface PrivacyPolicy {
/**
* バージョン
*/
version?: string;
/**
* メッセージ
*/
message?: string;
/**
* URL
*/
url?: string;
}
//# sourceMappingURL=pixiv-common.d.ts.map
import { PixivUser } from './pixiv-common';
import { PixivIllustItem } from './pixiv-illust';
/**

@@ -53,23 +52,2 @@ * pixiv イラストシリーズ詳細情報

}
/**
* pixiv イラストシリーズ詳細情報
*/
export interface PixivIllustSeriesItem {
/**
* シリーズ詳細
*/
illust_series_detail: IllustSeriesDetail;
/**
* シリーズの最初のイラスト
*/
illust_series_first_illust: PixivIllustItem;
/**
* シリーズに含まれているイラスト群
*/
illusts: PixivIllustItem[];
/**
* 次 URL
*/
next_url: string | null;
}
//# sourceMappingURL=pixiv-illust-series.d.ts.map

@@ -31,4 +31,5 @@ import { ImageUrls, PixivUser, Tag, Series } from './pixiv-common';

* manga: マンガ
* ugoira: うごイラ
*/
type: string;
type: 'illust' | 'manga' | 'ugoira';
/**

@@ -152,2 +153,4 @@ * 作品の画像URL群

* 作品のスタイル?
*
* @beta
*/

@@ -157,5 +160,7 @@ illust_book_style: number;

* コメントの閲覧制御?
*
* @beta
*/
comment_access_control: number;
comment_access_control?: number;
}
//# sourceMappingURL=pixiv-illust.d.ts.map
{
"name": "@book000/pixivts",
"version": "0.8.0",
"version": "0.9.0",
"description": "pixiv Unofficial API Library for TypeScript",

@@ -60,2 +60,3 @@ "homepage": "https://www.npmjs.com/package/@book000/pixivts",

"prettier": "2.8.8",
"snake-camel-types": "1.0.1",
"ts-node": "10.9.1",

@@ -62,0 +63,0 @@ "ts-node-dev": "2.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc