Waifu Vault SDK
This is the official API bindings for interacting with the Waifu Vault API.
For more information on Terms of Service and usage policy, please refer to the above website.
Install
Usage
The following interactions are allowed:
- Upload a File
- Get File Information
- Modify File Options
- Delete a File
- Download a File
- Create a Bucket
- Delete a Bucket
- Get Bucket Information
- Create an Album
- Associate Files With An Album
- Disassociate Files From An Album
- Delete an Album
- Get an Album
- Share an Album
- Revoke Public Access to an Album
- Download an Album
Upload a File
The following options can be set when creating a WaifuUploadRequest:
file: Optional value to upload a file from diskurl: Optional value to upload content from a URLbytes: Optional value to upload raw bytesbucket: Optional value to upload the file to a specific bucketexpires: Optional value to define the expiry time for the content- Valid values are:
m,h,d - If not set, the content exists for as long as the retention policy of the service
- Valid values are:
hide_filename: Optional flag to set to hide the filename from the URL generatedpassword: Optional value to set if the content should be encrypted or notone_time_download: Optional flag to set if the content should be deleted after first access
use ;
async
Get File Information
Retrieves information about a file stored with the API
This requires a token that is obtained from the response when uploading a file.
The following parameters can be set when using the WaifuGetRequest:
token: The token used to retrieve the fileformatted: Optional flag to determine if the expiry time is human-readable
use ;
async
Modify File Options
Modifies the options for a stored file in the API
The following parameters can be used to update a file's information:
password: Sets a new password for a file- If a password already exists,
previous_passwordmust also be used
- If a password already exists,
previous_password: The previous password for the file (required when setting a new password on encrypted content)custom_expiry: Sets a new expiry time for the contenthide_filename: Sets the flag to hide the filename from the URL
use ;
async
Delete a File
Deletes a file using the API denoted by the content token.
use ApiCaller;
async
Download a File
Downloads a file from the API with the given token
use ApiCaller;
use Write;
async
Create a Bucket
Creates a new bucket with the API to upload files to
use ;
async
Delete a Bucket
Delete a bucket and all the files contained within it.
The following parameters are required:
token: The bucket token for the bucket to delete
use ApiCaller;
async
Get Bucket Information
Retrieve information about files contained within a bucket.
The following parameters are required:
token: The bucket token for the bucket to inspect
use ApiCaller;
async
Create an Album
Create a new album for a bucket.
The following parameters are required:
bucket_token: The bucket token to create the new album forname: The name of the new album
use ApiCaller;
async
Associate Files With An Album
Associate a collections of files with an album.
The following parameters are required:
album_token: The token of the album to associate the files withfile_tokens: A slice of File tokens
use ApiCaller;
async
Disassociate Files From An Album
Disassociate a collections of files from an album.
The following parameters are required:
album_token: The token of the album to disassociate the files fromfile_tokens: A slice of File tokens
use ApiCaller;
async
Delete An Album
Delete an album from a bucket
There is an option to delete the associated files as well from the bucket
The following parameters are required:
album_token: The target album to deletedelete_files: Boolean to signal if the files should also be deleted or not
use ApiCaller;
async
Get an Album
Retrieve information about an album and its contents
The following parameters are required:
album_token: The token of the album to target
use ApiCaller;
async
Share an Album
Obtain a public URL for an album, making it public to view on the web
The following parameters are required:
album_token: The token of the album you wish to make public
use ApiCaller;
async
Revoke Access to a Public Album
Revokes public access to an album, invalidating all public URLs pointing towards it
The following parameters are required:
album_token: The token of the album to revoke public access to
use ApiCaller;
async
Download a Zip Archive of an Album
Download a ZIP archive of an album. This can be the entire album or select files from it
The following parameters are required:
album_token: The token of the album to downloadfile_ids: An option containing a slice of File IDs to download
use ApiCaller;
use Write;
async