mailosaur 6.0.1 → 6.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Mailosaur/version.rb +1 -1
- data/lib/mailosaur.rb +27 -19
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5dc306bc65feea8659cd8a674a55de4540d464ebee99126a66517d6462eb1ea
|
4
|
+
data.tar.gz: 693c6095c60f15d894d1ebfa757459902807b428418eef6ee3bbbe914833dd58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc8b2a6c20ba48a7b397085b5a7c1298a7651271677d9fb794671cb88037f653bd18e73749404f00212ba414f12a08a80e2374183acedf96f80562c42817d7f1
|
7
|
+
data.tar.gz: '08ed30549191fb9563f63b24d07e1063912e42578811d8c8dee64e7c2e8f01998f7deed3d18f2ddcc0fe68a440712769f919d840a093a9b3329e2adcc8985a19'
|
data/lib/Mailosaur/version.rb
CHANGED
data/lib/mailosaur.rb
CHANGED
@@ -38,37 +38,45 @@ module Mailosaur
|
|
38
38
|
end
|
39
39
|
|
40
40
|
class MailosaurClient
|
41
|
+
#
|
42
|
+
# Creates initializes a new instance of the MailosaurClient class.
|
43
|
+
# @param api_key [String] your Mailosaur API key.
|
44
|
+
# @param base_url [String] the base URI of the service.
|
45
|
+
#
|
46
|
+
def initialize(api_key, base_url = 'https://mailosaur.com/')
|
47
|
+
@api_key = api_key
|
48
|
+
@base_url = base_url
|
49
|
+
end
|
50
|
+
|
41
51
|
# @return [Analysis] analysis
|
42
|
-
|
52
|
+
def analysis
|
53
|
+
@analysis ||= Analysis.new(connection)
|
54
|
+
end
|
43
55
|
|
44
56
|
# @return [Files] files
|
45
|
-
|
57
|
+
def files
|
58
|
+
@files ||= Files.new(connection)
|
59
|
+
end
|
46
60
|
|
47
61
|
# @return [Messages] messages
|
48
|
-
|
62
|
+
def messages
|
63
|
+
@messages ||= Messages.new(connection)
|
64
|
+
end
|
49
65
|
|
50
66
|
# @return [Servers] servers
|
51
|
-
|
67
|
+
def servers
|
68
|
+
@servers ||= Servers.new(connection)
|
69
|
+
end
|
52
70
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
#
|
58
|
-
def initialize(api_key, base_url)
|
59
|
-
conn = Faraday.new(base_url || 'https://mailosaur.com/', {
|
71
|
+
private
|
72
|
+
|
73
|
+
def connection
|
74
|
+
Faraday.new(@base_url, {
|
60
75
|
headers: {
|
61
76
|
content_type: 'application/json; charset=utf-8',
|
62
77
|
user_agent: 'mailosaur-ruby/' + Mailosaur::VERSION
|
63
78
|
}
|
64
|
-
})
|
65
|
-
|
66
|
-
conn.basic_auth(api_key, '')
|
67
|
-
|
68
|
-
@analysis = Analysis.new(conn)
|
69
|
-
@files = Files.new(conn)
|
70
|
-
@messages = Messages.new(conn)
|
71
|
-
@servers = Servers.new(conn)
|
79
|
+
}).tap { |conn| conn.basic_auth(@api_key, '') }
|
72
80
|
end
|
73
81
|
end
|
74
82
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailosaur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mailosaur Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|