No description
  • Rust 99.5%
  • Nix 0.5%
Find a file
theBreadCompany ef9692524c
All checks were successful
Publish / audit for vulnerabilities (push) Successful in 3m5s
Publish / test library (push) Successful in 1m56s
Publish / publish (push) Successful in 1m23s
bump version; update dependencies; replace manual display trait impls with strum derive
2026-06-17 21:12:39 +02:00
.cargo ignore RUSTSEC-2023-0071 2026-05-16 20:07:17 +02:00
.forgejo/workflows bump crate version; prevent trigger of test.yml on every push 2026-05-20 03:48:45 +02:00
src bump version; update dependencies; replace manual display trait impls with strum derive 2026-06-17 21:12:39 +02:00
.gitignore remove fxpixiv 2025-09-03 02:30:53 +02:00
Cargo.lock bump version; update dependencies; replace manual display trait impls with strum derive 2026-06-17 21:12:39 +02:00
Cargo.toml bump version; update dependencies; replace manual display trait impls with strum derive 2026-06-17 21:12:39 +02:00
LICENSE fix file modes 2025-07-31 00:25:03 +02:00
README.md add more endpoints; unflake tests; add non_exhaustive; more tests 2026-05-20 03:38:07 +02:00
renovate.json Add renovate.json 2026-05-17 03:50:24 +02:00
shell.nix bump library version 2026-05-18 00:51:59 +02:00

libpixiv

Client library for pixiv

Usage

NOTE: Also consider minor version bumps as breaking change as long as this library is pre-1.0.

For now, no OAuth2 login will be provided, so please make sure to provide refresh tokens yourself.

The following features are available (some might be missing)

  • users
    • search
    • metadata
    • related
    • following/unfollowing
    • bookmarks
  • illustrations
    • search
      • automatically switches from regular to popular-preview endpoint (the thing you can use for 7 days after downloading the app) when SortMode::PopularDesc is used
    • metadata
    • related
    • comments
    • recommendations
    • bookmarking
    • bookmarks
  • animations (ugoira)
    • metadata lookup
    • NOTE: Animations are provided as image sequences, building those is currently not implemented in this crate.

Testing

You can run the following command to test existing features:

PIXIV_REFRESH_TOKEN= cargo test --lib

Notes

  • The crate uses implements a middleware to refresh the token if nescessary. However, there is currently no way to tell something went wrong with the flow until the first request trying to use the passed refresh token has been made.
  • While an async runtime is required, you may bring your own. Only the tests require tokio.
  • Documentation is NOT complete
  • cargo-llvm-cov currently reports a line coverage of ~90%
  • This is an unofficial API library, please consider all the implications this might have.
  • Also, this library is probably missing a few endpoints and/or features - if you happen to know or find any of those, feel free to open a PR :)