mailgun_api 0.2.1 → 0.2.2
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 +8 -8
- data/lib/mailgun/domain.rb +7 -3
- data/lib/mailgun_api.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTAzZGE1M2MyYmFiYzJmMjMzM2NiOGY2NmRjNmQ5OTMwMDY1MjFlMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Zjk3OGNjYTM5NWJlZGYwMzQ0NzcxN2M3OGZmOGE5YjQ2M2IyZDY1NQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGYwNzkyZGExMWUzODRmYzNlNDY0OThlOWEzODIzYzY3OGFiNjAyNTliYjQz
|
10
|
+
NDlhZWFlYzJjZjk0ZmUzMjkxMmM0ZWM4NDI4ZTIxMDViZGM5ZDJhMjA1NWYy
|
11
|
+
MDU5NmM4OWRmNjI2MDFlZGUzMjNhYmI0Y2FjZGFiYThiNjAzNjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2U3YjBjYmYxYmI3OTAxZWJiOWUwNDFkYTc1M2MwYTQ3MGVlNGVjM2U3Y2Ji
|
14
|
+
YzU1ODc5YzY3NWU1ODgxMzg1N2VjNGJhMjdkNzQ5ODMwMDE2OWFkZjIwMDlj
|
15
|
+
YjBlOTE3NDk5NzA2YzI4M2EwMWE1MzQ5MTE1MzViZmYwZDExOTc=
|
data/lib/mailgun/domain.rb
CHANGED
@@ -13,9 +13,13 @@ module Mailgun
|
|
13
13
|
@mailgun = mailgun
|
14
14
|
end
|
15
15
|
|
16
|
-
# List all domains
|
17
|
-
def list(
|
18
|
-
|
16
|
+
# List Domains. If domain name is passed return detailed information, otherwise return a list of all domains.
|
17
|
+
def list(domain=nil)
|
18
|
+
if domain
|
19
|
+
@mailgun.response = Mailgun::Base.fire(:get, @mailgun.api_url + "/domains/#{domain}")
|
20
|
+
else
|
21
|
+
@mailgun.response = Mailgun::Base.fire(:get, @mailgun.api_url + "/domains")["items"] || []
|
22
|
+
end
|
19
23
|
end
|
20
24
|
|
21
25
|
end
|
data/lib/mailgun_api.rb
CHANGED
@@ -115,6 +115,10 @@ module Mailgun
|
|
115
115
|
Mailgun::Domain.new(self).list
|
116
116
|
end
|
117
117
|
|
118
|
+
def find_domain(domain_name)
|
119
|
+
Mailgun::Domain.new(self).list(domain_name)
|
120
|
+
end
|
121
|
+
|
118
122
|
def create_list(list_name, options={})
|
119
123
|
Mailgun::List.new(self).create("#{list_name}@#{domain}", options)
|
120
124
|
end
|