UNPKG

@book000/pixivts

Version:

pixiv Unofficial API Library for TypeScript

26 lines 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IllustSeriesDetailCheck = void 0; const checks_1 = require("../checks"); const pixiv_common_1 = require("./pixiv-common"); class IllustSeriesDetailCheck extends checks_1.BaseSimpleCheck { checks() { return { id: (data) => typeof data.id === 'number' && data.id > 0, title: (data) => typeof data.title === 'string' && data.title.length > 0, caption: (data) => typeof data.caption === 'string', cover_image_urls: (data) => typeof data.cover_image_urls === 'object' && typeof data.cover_image_urls.medium === 'string' && data.cover_image_urls.medium.length > 0, series_work_count: (data) => typeof data.series_work_count === 'number' && data.series_work_count > 0, create_date: (data) => typeof data.create_date === 'string', width: (data) => typeof data.width === 'number' && data.width > 0, height: (data) => typeof data.height === 'number' && data.height > 0, user: (data) => new pixiv_common_1.PixivUserCheck().throwIfFailed(data.user), watchlist_added: (data) => typeof data.watchlist_added === 'boolean', }; } } exports.IllustSeriesDetailCheck = IllustSeriesDetailCheck; //# sourceMappingURL=pixiv-illust-series.js.map