Crate sendgrid_api

Source
Expand description

A fully generated, opinionated API client library for SendGrid.

docs.rs

§API Details

The Beta endpoints for the new Email Activity APIs - functionality is subject to change without notice. You may not have access to this Beta endpoint.

Email Activity offers filtering and search by event type for two days worth of data. There is an optional add-on to store 60 days worth of data. This add-on also gives you access to the ability to download a CSV of the 60 days worth of email event data. The Beta endpoints for the new Email Activity APIs - functionality is subject to change without notice. You may not have access to this Beta endpoint.

Email Activity offers filtering and search by event type for two days worth of data. There is an optional add-on to store 60 days worth of data. This add-on also gives you access to the ability to download a CSV of the 60 days worth of email event data.

§Client Details

This client is generated from the SendGrid OpenAPI specs based on API spec version ``. This way it will remain up to date as features are added. The documentation for the crate is generated along with the code to make this library easy to use.

To install the library, add the following to your Cargo.toml file.

[dependencies]
sendgrid-api = "0.7.0"

§Basic example

Typical use will require intializing a Client. This requires a user agent string and set of credentials.

use sendgrid_api::Client;

let sendgrid = Client::new(
    String::from("api-key"),
);

Alternatively, the library can search for most of the variables required for the client in the environment:

  • SENDGRID_API_KEY

And then you can create a client from the environment.

use sendgrid_api::Client;

let sendgrid = Client::new_from_env();

Modules§

alerts
api_key_permissions
api_keys
blocks_api
bounces_api
campaigns_api
cancel_scheduled_sends
categories
certificates
contacts
contacts_api_custom_fields
contacts_api_lists
contacts_api_recipients
contacts_api_segments
csv_ui_only
custom_fields
designs_api
domain_authentication
email_address_validation
email_cname_records
invalid_emails_api
ip_access_management
ip_addresses
ip_pools
ip_warmup
link_branding
lists
mail_send
marketing_campaigns_stats
query
reverse_dns
segmenting_contacts
segmenting_contacts_beta
send_test_email
sender_identities_api
sender_verification
senders
settings_enforced_tls
settings_inbound_parse
settings_mail
settings_partner
settings_tracking
single_sends
single_sign_on_settings
single_sign_on_teammates
spam_reports_api
stats
subuser_monitor_settings
subuser_statistics
subusers_api
suppressions
suppressions_global
suppressions_unsubscribe_groups
teammates
traits
transactional_templates
transactional_templates_versions
types
The data types sent to and returned from the API client.
users_api
webhooks

Structs§

Client
Entrypoint for interacting with the API client.
HeaderMap
A set of HTTP headers
Response
RootDefaultServer
StatusCode
An HTTP status code (status-code in RFC 7230 et al.).

Enums§

ClientError
Errors returned by the client

Constants§

FALLBACK_HOST