Crates.io | sendgrid2 |
lib.rs | sendgrid2 |
version | 4.0.0 |
source | src |
created_at | 2022-10-11 18:39:05.903775 |
updated_at | 2022-10-21 02:19:18.939455 |
description | Sendgrid client, generated from the OpenAPI spec. |
homepage | https://github.com/libninjacom/sendgrid-rs |
repository | https://github.com/libninjacom/sendgrid-rs |
max_upload_size | |
id | 685517 |
size | 1,205,784 |
Sendgrid client, generated from the OpenAPI spec.
use sendgrid2::SendgridClient;
use sendgrid2::model::*;
#[tokio::main]
async fn main() {
let client = SendgridClient::from_env();
let response = client
.get_access_settings_activity()
.limit(1)
.on_behalf_of("your on behalf of")
.send()
.await
.unwrap();
println!("{:#?}", response);
}
This example loads configuration from environment variables, specifically:
SENDGRID_AUTHORIZATION
Add this to your Cargo.toml:
[dependencies]
sendgrid2 = "0.1.0"
You can see working examples of every API call in the examples/
directory.
Contributions are welcome!
Library created with Libninja.