Crates.io | baserow-rs |
lib.rs | baserow-rs |
version | |
source | src |
created_at | 2024-12-11 23:20:37.403077 |
updated_at | 2024-12-12 22:13:25.219016 |
description | A Rust client for the Baserow API. |
homepage | |
repository | https://github.com/cedricziel/baserow-rs |
max_upload_size | |
id | 1480604 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Baserow-rs is a Rust client for the Baserow API. It is a work in progress and is not yet ready for production use.
Baserow supports two authentication methods:
You should use the database token for server-to-server communication and the JWT token for client-to-server communication.
Note: Some endpoints require a JWT token, some require a database token, and some require both.
let configuration = ConfigBuilder::new()
.base_url(endpoint.as_str())
.database_token(api_key.as_str())
.build();
let configuration = ConfigBuilder::new()
.base_url(endpoint.as_str())
.email("test@example.com")
.password("password")
.build();
let baserow = Baserow::with_configuration(configuration);
baserow.token_auth().await?;
let configuration = ConfigBuilder::new()
.base_url(endpoint.as_str())
.database_token(api_key.as_str())
.build();
let baserow = Baserow::with_configuration(configuration);
// retrieve a table by id
let rows = baserow
.table_by_id(176)
// grab a request builder
.rows()
// filter by a field
.filter_by("field_1529", Filter::Equal, "testaaaaaaaaaa")
// order by a field
.order_by("field_1529", OrderDirection::Asc)
// execute the query
.get()
.await?;
println!("Rows: {:#?}", rows);
Apache 2.0