#api-client #booru #szurubooru #image-host

szurubooru-client

A wrapper around the Szurubooru API, including type-safe Query and Sort tokens

10 releases (4 breaking)

0.6.2 Sep 6, 2024
0.6.1 Sep 6, 2024
0.5.0 Sep 6, 2024
0.3.0 Aug 11, 2024
0.1.1 Aug 10, 2024

#568 in Web programming

Download history 108/week @ 2024-08-04 262/week @ 2024-08-11 10/week @ 2024-08-18 441/week @ 2024-09-01 37/week @ 2024-09-08 38/week @ 2024-09-15 11/week @ 2024-09-22 63/week @ 2024-09-29

63 downloads per month

MIT license

295KB
5K SLoC

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.


lib.rs:

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.

Dependencies

~7–24MB
~383K SLoC