agentmail 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91279f5876443c121efd7dd19c26ef9dd5ca1ccd8d6b2f3401ae5a800600d1ca
4
- data.tar.gz: 4a4d20ae2ded9c37bb3793370c3d3135f31903b4c4ba783a145d1363a9fc0a83
3
+ metadata.gz: ea21df7553998eafe9ee6006d329a05ad436a14cd71b83d089671124dab6c7eb
4
+ data.tar.gz: a20bca31abe5726f002d231af25580dde2dd5921aea5234c948afb20d92612d8
5
5
  SHA512:
6
- metadata.gz: 2d902cb79eba2890efb15919f66a0644522b7c21c4f66ddc55d4132517b71a27c64b2e05ada8539c28b5c21bdbb8a1eefb3b566ac8b7a3673d5833feb340c94b
7
- data.tar.gz: 25cdfd7ddd6918cdea284fe33a970bc84eb072809720be5262672077f392e285a2e0325f30d03c9cada820974e2f304bef16321764d2c5a25fe6a5fe4a722517
6
+ metadata.gz: cfef6c404ee5b9e900ac06b303c9d89111df95f8500b4a3ada4c67512425f1f9bbdfd190fba23fa459fb3ad9e91e04cb0862f0553ef4f0bc3ec5601e94b0ef7d
7
+ data.tar.gz: 45935529fcbfcf85d17b8955bca50cdb259765692449f6899478ab18b1127219018474368a705e89fec447400c622d84652005950b1cbd05a49a8518f3d7da23
@@ -6,6 +6,7 @@ require "faraday"
6
6
  require_relative "error"
7
7
  require_relative "response"
8
8
  require_relative "resources/inboxes"
9
+ require_relative "resources/pods"
9
10
  require_relative "resources/threads"
10
11
 
11
12
  module Agentmail
@@ -47,6 +48,10 @@ module Agentmail
47
48
  @inboxes ||= Resources::Inboxes.new(self)
48
49
  end
49
50
 
51
+ def pods
52
+ @pods ||= Resources::Pods.new(self)
53
+ end
54
+
50
55
  def threads
51
56
  @threads ||= Resources::Threads.new(self)
52
57
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "base_resource"
4
+
5
+ module Agentmail
6
+ module Resources
7
+ class Pods < BaseResource
8
+ def list(params = {})
9
+ request(:get, "/v0/pods", params: params).body
10
+ end
11
+
12
+ def retrieve(pod_id)
13
+ request(:get, pod_path(pod_id)).body
14
+ end
15
+ alias get retrieve
16
+
17
+ def create(attributes = {})
18
+ request(:post, "/v0/pods", body: attributes).body
19
+ end
20
+
21
+ def delete(pod_id)
22
+ request(:delete, pod_path(pod_id)).body
23
+ end
24
+
25
+ # Nested inbox endpoints
26
+
27
+ def list_inboxes(pod_id, params = {})
28
+ request(:get, "#{pod_path(pod_id)}/inboxes", params: params).body
29
+ end
30
+
31
+ def create_inbox(pod_id, attributes = {})
32
+ request(:post, "#{pod_path(pod_id)}/inboxes", body: attributes).body
33
+ end
34
+
35
+ def delete_inbox(pod_id, inbox_id)
36
+ request(:delete, "#{pod_path(pod_id)}/inboxes/#{inbox_id}").body
37
+ end
38
+
39
+ private
40
+
41
+ def pod_path(pod_id)
42
+ "/v0/pods/#{pod_id}"
43
+ end
44
+ end
45
+ end
46
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Agentmail
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agentmail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toadstool Labs
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-02-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: faraday
@@ -70,6 +69,7 @@ files:
70
69
  - lib/agentmail/error.rb
71
70
  - lib/agentmail/resources/base_resource.rb
72
71
  - lib/agentmail/resources/inboxes.rb
72
+ - lib/agentmail/resources/pods.rb
73
73
  - lib/agentmail/resources/threads.rb
74
74
  - lib/agentmail/response.rb
75
75
  - lib/agentmail/version.rb
@@ -82,7 +82,6 @@ metadata:
82
82
  homepage_uri: https://github.com/agentmail-to/agentmail-ruby
83
83
  source_code_uri: https://github.com/agentmail-to/agentmail-ruby
84
84
  changelog_uri: https://github.com/agentmail-to/agentmail-ruby/blob/main/CHANGELOG.md
85
- post_install_message:
86
85
  rdoc_options: []
87
86
  require_paths:
88
87
  - lib
@@ -97,8 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
96
  - !ruby/object:Gem::Version
98
97
  version: '0'
99
98
  requirements: []
100
- rubygems_version: 3.5.22
101
- signing_key:
99
+ rubygems_version: 4.0.3
102
100
  specification_version: 4
103
101
  summary: Lightweight Ruby client for the AgentMail API.
104
102
  test_files: []