npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pixiv-api-client-zzh1234567

v0.16.0

Published

Promise based Pixiv API client for react native and node.js

Downloads

13

Readme

Pixiv API Client

Build Status styled with prettier

Promise based Pixiv API client for node.js and react native

Install

$ npm install pixiv-api-client-zzh1234567 --save 

Usage

const PixivApi = require('pixiv-api-client-zzh1234567');
const pixiv = new PixivApi();

const word = 'ラブライブ';
pixiv.login('username', 'password').then(() => {
  return pixiv.searchIllust(word).then(json => {
	console.log(json);
	return pixiv.requestUrl(json.next_url);
  }).then(json => {
	console.log(json); //next results
  });
});

API

PixivApi()

pixiv.login(username, password, rememberPassword)

Api client will try once to relogin again on error if rememberPassword is set to true

  • username - Pixiv username
  • password - Pixiv password
  • rememberPassword - Boolean (default: true)

pixiv.logout()

pixiv.refreshAccessToken(refreshToken)

Refresh access token with refreshToken

  • refreshToken - string (if not provided, will use refresh token that stored with api client after login)

pixiv.createProvisionalAccount(nickName)

  • nickName - string

pixiv.userState()

require auth

pixiv.editUserAccount(fields)

require auth

  • fields - object
    • pixivId
    • email
    • currentPassword
    • newPassword

pixiv.sendAccountVerificationEmail()

require auth

pixiv.searchIllust(word, options)

require auth

  • word - word to search (required)
  • options - object (optional)
    • search_target: partial_match_for_tags | exact_match_for_tags | title_and_caption (default: partial_match_for_tags)
    • sort: date_desc | date_asc (default: date_desc)
    • duration: within_last_day | within_last_week | within_last_month

pixiv.searchUser(word)

require auth

  • word - word to search (required)

pixiv.searchAutoComplete(word)

require auth

  • word - word to search (required)

pixiv.userDetail(userId, options)

  • userId - Pixiv user id
  • options - object (optional)

pixiv.userIllusts(id, options)

require auth

  • id - Pixiv illust id
  • options - object (optional)
    • type - one of illust | manga

pixiv.userBookmarksIllust(id, options)

require auth

  • id - Pixiv illust id
  • options - object (optional)
    • restrict - one of public | private (default: public)

pixiv.userBookmarkIllustTags(options)

require auth

  • options - object (optional)
    • restrict - one of public | private (default: public)

pixiv.illustBookmarkDetail(id, options)

require auth

  • id - Pixiv illust id
  • options - object (optional)

pixiv.illustComments(id, options)

require auth

  • id - Pixiv illust id
  • options - object (optional)

pixiv.illustRelated(id, options)

require auth

  • id - Pixiv illust id
  • options - object (optional)

pixiv.illustDetail(id, options)

require auth

  • id - Pixiv illust id
  • options - object (optional)

pixiv.illustNew(options)

require auth

  • options - object (optional)

pixiv.illustFollow(options)

require auth

  • options - object (optional)
    • restrict - one of all | public | private (default: all)

pixiv.illustRecommended(options)

require auth

  • options - object (optional)

pixiv.illustRecommendedPublic(options)

  • options - object (optional)

pixiv.illustRanking(options)

require auth

  • options - object
    • date: Date
    • mode: day | week | month | day_male | day_female | week_original | week_rookie | day_r18 | day_male_r18 | day_female_r18 | week_r18 | week_r18g| day_manga | week_manga | month_manga | week_rookie_manga | day_r18_manga | week_r18_manga | week_r18g_manga (default: day)

pixiv.illustMyPixiv()

require auth

pixiv.illustAddComment(id, comment)

require auth

  • id - Pixiv illust id
  • comment - string

pixiv.ugoiraMetaData(id)

require auth

  • id - Pixiv illust(ugoira) id

pixiv.trendingTagsIllust(options)

require auth

  • options - object (optional)

pixiv.bookmarkIllust(id, restrict, tags)

require auth

  • id - Pixiv illust id
  • restrict - one of public | private (default: public)
  • tags - array of string (optional)

pixiv.unbookmarkIllust(id)

require auth

  • id - Pixiv illust id

pixiv.mangaRecommended(options)

require auth

  • options - object (optional)

pixiv.mangaNew(options)

require auth

  • options - object (optional)

pixiv.searchNovel(word, options)

require auth

  • word - word to search (required)
  • options - object (optional)
    • search_target: partial_match_for_tags | exact_match_for_tags | title_and_caption (default: partial_match_for_tags)
    • sort: date_desc | date_asc (default: date_desc)
    • duration: within_last_day | within_last_week | within_last_month

pixiv.novelRecommended(options)

require auth

  • options - object (optional)

pixiv.novelRecommendedPublic(options)

  • options - object (optional)

pixiv.novelNew(options)

require auth

  • options - object (optional)

pixiv.userRecommended(options)

require auth

  • options - object (optional)

pixiv.userFollowing(id, options)

require auth

  • id - Pixiv user id
  • options - object (optional)
    • restrict: public | private (default: public)

pixiv.userFollower(id, options)

require auth

  • id - Pixiv user id
  • options - object (optional)

pixiv.userMyPixiv(id)

require auth

  • id - Pixiv user id

pixiv.followUser(id, restrict)

require auth

  • id - Pixiv user id
  • restrict - one of public | private (default: public)

pixiv.unfollowUser(id)

require auth

  • id - Pixiv user id

pixiv.setLanguage(lang)

set HTTP header Accept-Language for pixiv api request

  • lang - HTTP header Accept-Language

pixiv.requestUrl(url, options)

can be use to request pixiv endpoint or use for traversing results by passing next_url from result of other api such as pixiv.searchIllust

  • options - object (optional)

Tests

Export pixiv username and password before running Tests.

$ export USER_NAME=Pixiv username
$ export PASSWORD=Pixiv password
$ npm test

Related projects

PxView - Android/iOS client for Pixiv built in react-native

License

MIT