Package Exports
- pixiv-app-api
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pixiv-app-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pixiv-app-api 
Promise base pixiv API client

Inspired by upbit/pixivpy: Pixiv API for Python.
Features
- Promise base
- Converts the output json key to camelCase
- Converts the parameter to snakeCase
- Supports API without login
Install
$ npm install --save pixiv-app-api
Usage
const PixivAppApi = require('pixiv-app-api');
const pixivImg = require('pixiv-img');
const pixiv = new PixivAppApi();
pixiv.searchIllust('艦これ10000users入り')
.then(json => {
console.log(`downloading ${json.illusts[0].title}`);
return pixivImg(json.illusts[0].image_urls.large);
}).then(() => {
console.log('finish');
});
See examples.
API
constructor(username?: string, password?: string): PixivAppApi;
login(username?: string, password?: string): Promise
authInfo(): Object;
hasNext(): bool;
next(): Promise;
nextQuery(): string;
userDetail(id: ID, params?: Object): Promise
userIllusts(id: ID, params?: Object): Promise
userFollowAdd(id: ID, data?: Object): Promise
userFollowDelete(id: ID, data?: Object): Promise
userBookmarksIllust(id: ID, params?: Object): Promise
userFollowing(id: ID, params?: Object): Promise
userFollower(id: ID, params?: Object): Promise
userMypixiv(id: ID, params?: Object): Promise
userList(id: ID, params?: Object): Promise
illustDetail(id: ID, params?: Object): Promise
illustNew(params?: Object): Promise
illustFollow(params?: Object): Promise
illustComments(id: ID, params?: Object): Promise
illustRelated(id: ID, params?: Object): Promise
illustRecommended(params?: Object): Promise
illustRecommendedNologin(params?: Object): Promise
illustRanking(params?: Object): Promise
trendingTagsIllust(params?: Object): Promise
searchIllust(word: Word, params?: Object): Promise
searchNovel(word: Word, params?: Object): Promise
searchUser(word: Word, params?: Object): Promise
searchAutoComplete(word: Word): Promise
illustBookmarkDetail(id: ID, params?: Object): Promise
illustBookmarkAdd(id: ID, data?: Object): Promise
illustBookmarkDelete(id: ID, data?: Object): Promise
userBookmarkTagsIllust(params?: Object): Promise
novelRecommended(params?: Object): Promise
mangaNew(params?: Object): Promise
mangaRecommended(params?: Object): Promise
novelRecommendedNologin(params?: Object): Promise
novelNew(params?: Object): Promise
fetch(target: string, opts?: Object): Promise
See Sniffer for iOS 6.x Common API · upbit/pixivpy Wiki
pixiv.next()
Return next request result.
usage
pixiv.searchIllust(word)
.then(() => pixiv.next())
.then(() => pixiv.next())
.then(json => {
console.log(json);
});
pixiv.hasNext()
Return true
if pixiv.next()
is able to run.
usage
if (pixiv.hasNext()) {
pixiv.next().then();
}
pixiv.nextQuery()
Return next params parameter.
Tests
Export your pixiv username and password before running Tests.
$ export USERNAME=your pixiv username...
$ export PASSWORD=your pixiv password...
$ npm test
Related
- PixivDeck - pixiv client for Desktop like TweetDeck
- pixiv-img - save the image of pixiv
- pixiv-dl - pixiv image downloader
- pixiv-dl-preview - electron pixiv downloader
License
MIT © akameco