Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new API changes #10

Open
VictoriqueMoe opened this issue Aug 20, 2024 · 1 comment
Open

Support new API changes #10

VictoriqueMoe opened this issue Aug 20, 2024 · 1 comment
Assignees

Comments

@VictoriqueMoe
Copy link
Member

VictoriqueMoe commented Aug 20, 2024

There have been a number of API changes to support buckets. you can refer to this PR: waifuvault/waifuVault-node-api#15

Buckets are temprry virtual buckets that are managed with a single token

here are the outline of the changes:

  • uploadFile now takes an optinal path paramater that is a token. when supplied. it will call /uploadFile/{token} this is the bucket token
  • the file info and upload response now returns a bucket prop that is nullable. if the file belongs to a bucket, the bucket token will be there
  • createBucket endpoint that is a GET and takes no body (buckets are created once per IP). the endpoint is /rest/bucket/create
  • deleteBucket endpoint a DELETE takes the bucxket token as a path param. the endpoint is /rest/bucket/${bucketToken}
  • getBucket endpoint, a POST to /rest/bucket/get that takes the the body of:
{
   "bucket_token": "bucketToken"
}

the response of the get is an object with the shape of

"token": "string",
"files": FileResponseObject[]

where FileResponseObject is whatever type you have defined in the response of getFileInfo.

@VictoriqueMoe
Copy link
Member Author

you can see the new api docs and the schemeas here: https://waifuvault.moe/api-docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants