oxibooru-client/szurubooru-client
Scott Lyons f2ae459c22 fix(python): refactoring python client
refactoring several pieces of the client and the Python wrapper to make them more usable.
2024-08-21 08:36:59 -07:00
..
src fix(python): refactoring python client 2024-08-21 08:36:59 -07:00
Cargo.lock Reorganizing and documenting 2024-08-09 09:18:12 -07:00
Cargo.toml fix(python): refactoring python client 2024-08-21 08:36:59 -07:00
CHANGELOG.md docs(changelog): updating changelog 2024-08-12 01:06:34 -07:00
pyproject.toml fix(python): refactoring python client 2024-08-21 08:36:59 -07:00
README.md Reorganizing and documenting 2024-08-09 09:18:12 -07:00

szurubooru-client

SzurubooruClient is a wrapper around the excellently-documented Szurubooru API, including type-safe (if not API-safe) Query and Sort tokens.

Creating a new client

Basic authentication

Please keep in mind that this is not the preferred method of authentication. Tokens are far superior.

use szurubooru_client::SzurubooruClient;
let client = SzurubooruClient::new_with_basic_auth("http://localhost:5001", "myuser",
    "mypassword", true).unwrap();

Token authentication

The far superior and more secure means of authentication

use szurubooru_client::SzurubooruClient;
let client = SzurubooruClient::new_with_token("http://localhost:5001", "myuser", "sz-123456", true).unwrap();

For all other methods for making the requests, see the documentation.