resend 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/resend/emails/receiving.rb +9 -1
- data/lib/resend/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5bac6323a992135612079621a1d9933831c44e6202838cff57377397c2214f2c
|
|
4
|
+
data.tar.gz: c584c139bad503543f7cad52639f9dc6fe86812da1550b38729cd96638b9988b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4411842066220cc450056f799a94d6cba513a6bf5c0c67c8f467e68e1cc8320911c3f47f983ec32430dc09961d4e005fb1f1ce429997b2ae5be5045eb7b85de6
|
|
7
|
+
data.tar.gz: '0586cc9b333744f728d34847cc7de9bb18109b5658e870354f3b6a69b1988d4366e0bf4f37e3564a6a63f16de9e33f1070b3f15410be0dc88a996e8d3eff9336'
|
|
@@ -8,12 +8,20 @@ module Resend
|
|
|
8
8
|
# Retrieve a single received email
|
|
9
9
|
#
|
|
10
10
|
# @param email_id [String] The ID of the received email
|
|
11
|
+
# @param params [Hash] Optional query parameters
|
|
12
|
+
# @option params [String] :html_format Format of the HTML content (e.g., "sanitized", "raw")
|
|
11
13
|
# @return [Hash] The received email object
|
|
12
14
|
#
|
|
13
15
|
# @example
|
|
14
16
|
# Resend::Emails::Receiving.get("4ef9a417-02e9-4d39-ad75-9611e0fcc33c")
|
|
15
|
-
|
|
17
|
+
#
|
|
18
|
+
# @example With html_format
|
|
19
|
+
# Resend::Emails::Receiving.get("4ef9a417-02e9-4d39-ad75-9611e0fcc33c", html_format: "sanitized")
|
|
20
|
+
def get(email_id = "", params = {})
|
|
16
21
|
path = "emails/receiving/#{email_id}"
|
|
22
|
+
|
|
23
|
+
path += "?html_format=#{CGI.escape(params[:html_format].to_s)}" if params[:html_format]
|
|
24
|
+
|
|
17
25
|
Resend::Request.new(path, {}, "get").perform
|
|
18
26
|
end
|
|
19
27
|
|
data/lib/resend/version.rb
CHANGED