Skip to content

Commit

Permalink
Update readme, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
nakedmcse committed Mar 20, 2024
1 parent 69db95c commit 8a7d230
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ pip install waifuvault

## Usage

This API contains 4 interactions:
This API contains 5 interactions:

1. [Upload File](#upload-file)
2. [Get file Info](#get-file-info)
3. [Delete File](#delete-file)
4. [Get File](#get-file)
3. [Update file Info](#update-file-info)
4. [Delete File](#delete-file)
5. [Get File](#get-file)

The package is namespaced to `waifuvault`, so to import it, simply:

Expand Down Expand Up @@ -100,6 +101,31 @@ print(upload_info.retentionPeriod)
print(upload_info.url)
```

### Update File Info<a id="update-file-info"></a>

If you have a token from your upload. Then you can get file info. This results in the following info:

* token
* url
* protected
* retentionPeriod

Use the `file_update` function. This function takes the following options as parameters:

| Option | Type | Description | Required | Extra info |
|---------------------|----------|---------------------------------------------------------|----------|------------|
| `token` | `string` | The token of the upload | true | |
| `password` | `string` | The current password of the file | false | |
| `previous_password` | `string` | The previous password of the file, if changing password | false | |
| `custom_expiry` | `string` | Custom expiry in the same form as upload command | false | |
| `hide_filename` | `bool` | Sets whether the filename is visible in the URL or not | false | |

```python
import waifuvault
update_info = waifuvault.file_update(your_token,custom_expiry="2d")
print(upload_info.retentionPeriod)
```

### Delete File<a id="delete-file"></a>

To delete a file, you must supply your token to the `delete_file` function.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "waifuvault"
version = "1.2.2"
version = "1.2.3"
authors = [
{ name="Walker Aldridge", email="[email protected]" },
]
Expand Down

0 comments on commit 8a7d230

Please sign in to comment.