mass-client 1.0.12 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/first-line/profile_mta.rb +1 -1
- data/lib/first-line/profile_rpa.rb +2 -1
- data/lib/mass-client.rb +21 -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: 53ba01f6dc72c15098bf26fa1ddd656acf3c81b259d53f0d544664fef62d6f94
|
4
|
+
data.tar.gz: b446332f82fc89b30a93c6f682c5562d1ba2e175e407aad431ae09a03d98a6f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88acec54a80b2eaf25e443a160473f0e325df2335866097d7626cf829f9bc69f881e2dcaa81cf7d69b8fc53d4a8af0e95b386b900d4425af3504297e277c5ef6
|
7
|
+
data.tar.gz: 5b3bd557a39e38ef55cce0a5118c1cda8c8ee6a0e7cbdf4765ce798670c3d424ced8f5f676b21b8dc61a713597ea18c0acd4ab076a5626f8bae0582baf470a99
|
@@ -91,7 +91,7 @@ module Mass
|
|
91
91
|
# l.logf "Instantly warming email".red
|
92
92
|
else
|
93
93
|
lead_email = envelope.from[0].mailbox.to_s + '@' + envelope.from[0].host.to_s
|
94
|
-
|
94
|
+
|
95
95
|
lead_name = envelope.from[0].name
|
96
96
|
subject = envelope.subject
|
97
97
|
body = imap.fetch(id, "BODY[]")[0].attr["BODY[]"]
|
@@ -210,6 +210,7 @@ module Mass
|
|
210
210
|
}
|
211
211
|
downloadImage('#{url}', '#{filename}')
|
212
212
|
"
|
213
|
+
#binding.pry
|
213
214
|
driver.execute_script(js0)
|
214
215
|
|
215
216
|
# code
|
@@ -227,7 +228,7 @@ module Mass
|
|
227
228
|
break
|
228
229
|
end
|
229
230
|
}
|
230
|
-
raise "
|
231
|
+
raise "Downloaded file #{filename} not found in paths #{tmp_paths.join(',')}." if tmp_path.nil?
|
231
232
|
|
232
233
|
# upload the file to dropbox
|
233
234
|
BlackStack::DropBox.dropbox_upload_file(tmp_path, path)
|
data/lib/mass-client.rb
CHANGED
@@ -17,7 +17,7 @@ module Mass
|
|
17
17
|
# Parameters:
|
18
18
|
#
|
19
19
|
# api_key: Mandatory. The API key of your MassProspecting account.
|
20
|
-
# subaccount:
|
20
|
+
# subaccount: Optional. The name of the subaccount you want to work with. If you provide a subaccount, the SDK will call the master to get the URL and port of the subaccount. Default is nil.
|
21
21
|
# api_url: Optional. The URL of the MassProspecting API. Default is 'https://massprospecting.com'.
|
22
22
|
# api_port: Optional. The port of the MassProspecting API. Default is 443.
|
23
23
|
# api_version: Optional. The version of the MassProspecting API. Default is '1.0'.
|
@@ -25,8 +25,8 @@ module Mass
|
|
25
25
|
# js_path: Optional. The path to the JavaScript file to be used by the SDK. Default is nil.
|
26
26
|
# download_path: Optional. The path to the download folder(s) to be used by the SDK. Default is [].
|
27
27
|
def self.set(
|
28
|
-
api_key
|
29
|
-
subaccount
|
28
|
+
api_key: ,
|
29
|
+
subaccount: nil,
|
30
30
|
api_url: 'https://massprospecting.com',
|
31
31
|
api_port: 443,
|
32
32
|
api_version: '1.0',
|
@@ -42,23 +42,25 @@ module Mass
|
|
42
42
|
api_version: api_version,
|
43
43
|
backtrace: backtrace
|
44
44
|
)
|
45
|
-
|
46
|
-
params = { 'name' => subaccount }
|
47
|
-
ret = BlackStack::API.post(
|
48
|
-
endpoint: "resolve/get",
|
49
|
-
params: params
|
50
|
-
)
|
51
|
-
|
52
|
-
raise "Error initializing client: #{ret['status']}" if ret['status'] != 'success'
|
53
45
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
46
|
+
if subaccount
|
47
|
+
params = { 'name' => subaccount }
|
48
|
+
ret = BlackStack::API.post(
|
49
|
+
endpoint: "resolve/get",
|
50
|
+
params: params
|
51
|
+
)
|
52
|
+
|
53
|
+
raise "Error initializing client: #{ret['status']}" if ret['status'] != 'success'
|
54
|
+
|
55
|
+
# call the master to get the URL and port of the subaccount.
|
56
|
+
BlackStack::API.set_client(
|
57
|
+
api_key: ret['api_key'],
|
58
|
+
api_url: ret['url'],
|
59
|
+
api_port: ret['port'],
|
60
|
+
api_version: api_version,
|
61
|
+
backtrace: backtrace
|
62
|
+
)
|
63
|
+
end
|
62
64
|
|
63
65
|
# validate: download_path must be a string or an arrow of strings
|
64
66
|
if download_path.is_a?(String)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mass-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uri
|