Skip to content

Commit

Permalink
Version 0.23.0
Browse files Browse the repository at this point in the history
This incorporates #118 for a new release.
  • Loading branch information
gsquire committed Oct 10, 2024
1 parent 40bacd1 commit 86b5ab6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.23.0 - 2024-10-10

### Added

- The message field now supports `mail_settings`. See #118.

### Changed

- Update to data-encoding 2.6.

## 0.22.1 - 2024-09-04

### Added
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sendgrid"
version = "0.22.1"
version = "0.23.0"
edition = "2021"
authors = ["Garrett Squire <[email protected]>"]
description = "An unofficial client library for the SendGrid API"
Expand All @@ -12,7 +12,7 @@ documentation = "https://docs.rs/sendgrid"
readme = "README.md"

[dependencies]
data-encoding = "2.5"
data-encoding = "2.6"
reqwest = { version = "0.12", default-features = false, features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
15 changes: 8 additions & 7 deletions src/v3/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub struct TopLevelBypassFilterSettings {
bypass_list_management: BypassListManagement,
}

// TODO: Make a single type with the boolean enable field?
/// Used for the bypass list management setting.
#[derive(Default, Serialize)]
pub struct BypassListManagement {
Expand Down Expand Up @@ -144,7 +145,7 @@ impl BypassListManagement {
Default::default()
}

/// Enable or disable the setting
/// Enable or disable the setting.
pub fn set_enable(mut self, enable: bool) -> Self {
self.enable = enable;
self
Expand Down Expand Up @@ -191,7 +192,7 @@ impl BypassSpamManagement {
Default::default()
}

/// Enable or disable the setting
/// Enable or disable the setting.
pub fn set_enable(mut self, enable: bool) -> Self {
self.enable = enable;
self
Expand All @@ -204,7 +205,7 @@ impl BypassBounceManagement {
Default::default()
}

/// Enable or disable the setting
/// Enable or disable the setting.
pub fn set_enable(mut self, enable: bool) -> Self {
self.enable = enable;
self
Expand All @@ -217,7 +218,7 @@ impl BypassUnsubscribeManagement {
Default::default()
}

/// Enable or disable the setting
/// Enable or disable the setting.
pub fn set_enable(mut self, enable: bool) -> Self {
self.enable = enable;
self
Expand All @@ -230,7 +231,7 @@ impl Footer {
Default::default()
}

/// Enable or disable the footer
/// Enable or disable the footer.
pub fn set_enable(mut self, enable: bool) -> Self {
self.enable = enable;
self
Expand All @@ -242,7 +243,7 @@ impl Footer {
self
}

/// Set the html content of the footer.
/// Set the HTML content of the footer.
pub fn set_html(mut self, html: String) -> Self {
self.html = Some(html);
self
Expand All @@ -255,7 +256,7 @@ impl SandboxMode {
Default::default()
}

/// Enable or disable the setting
/// Enable or disable the setting.
pub fn set_enable(mut self, enable: bool) -> Self {
self.enable = enable;
self
Expand Down
4 changes: 2 additions & 2 deletions src/v3/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//! This module encompasses all types needed to send mail using version 3 of the mail
//! send API.
pub mod message;

use std::collections::{HashMap, HashSet};

use data_encoding::BASE64;
Expand All @@ -16,6 +14,8 @@ use crate::v3::message::MailSettings;
use reqwest::blocking::Response as BlockingResponse;
use reqwest::{Client, Response};

pub mod message;

const V3_API_URL: &str = "https://api.sendgrid.com/v3/mail/send";

/// Just a redefinition of a map to store string keys and values.
Expand Down

0 comments on commit 86b5ab6

Please sign in to comment.