mass-client 1.0.11 → 1.0.14
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/first-line/profile_mta.rb +1 -1
- data/lib/first-line/profile_rpa.rb +1 -0
- data/lib/mass-client.rb +51 -1
- 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: 53fd9f6e473d0b31531ae56a7dd16958b97e795d641359ceaec7a910c68b24d3
|
4
|
+
data.tar.gz: b827776819119c4a1b94bd11b05dbd5608953aa56bab23131e400062bcbcb9f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a9ba49872bd605d6c686b95911e419efcd23be69c3ae4043999385d8a00a54e66db3c3406e7e70e2707b252d42bbd3f4f4ffc06f86d44ff8afb0bd9a55a279c
|
7
|
+
data.tar.gz: 1b84beacd8a19eb5803940db7fc0b162ca67b1b6c505e4082c41746db9c70cc1bde363e7d8a2f87aaa5f34a16524816794f5b9f8fcc92b793a97a09b10db8409
|
@@ -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[]"]
|
data/lib/mass-client.rb
CHANGED
@@ -10,8 +10,58 @@ require 'colorize'
|
|
10
10
|
module Mass
|
11
11
|
@@js_path
|
12
12
|
@@drownload_path
|
13
|
+
@@api_client
|
14
|
+
|
15
|
+
# set the MassProspecting API client
|
16
|
+
#
|
17
|
+
# Parameters:
|
18
|
+
#
|
19
|
+
# api_key: Mandatory. The API key of your MassProspecting account.
|
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
|
+
# api_url: Optional. The URL of the MassProspecting API. Default is 'https://massprospecting.com'.
|
22
|
+
# api_port: Optional. The port of the MassProspecting API. Default is 443.
|
23
|
+
# api_version: Optional. The version of the MassProspecting API. Default is '1.0'.
|
24
|
+
# backtrace: Optional. If true, the backtrace of the exceptions will be returned by the access points. If false, only an error description is returned. Default is false.
|
25
|
+
# js_path: Optional. The path to the JavaScript file to be used by the SDK. Default is nil.
|
26
|
+
# download_path: Optional. The path to the download folder(s) to be used by the SDK. Default is [].
|
27
|
+
def self.set(
|
28
|
+
api_key: ,
|
29
|
+
subaccount: nil,
|
30
|
+
api_url: 'https://massprospecting.com',
|
31
|
+
api_port: 443,
|
32
|
+
api_version: '1.0',
|
33
|
+
backtrace: false,
|
34
|
+
js_path: nil,
|
35
|
+
download_path: []
|
36
|
+
)
|
37
|
+
# call the master to get the URL and port of the subaccount.
|
38
|
+
BlackStack::API.set_client(
|
39
|
+
api_key: api_key,
|
40
|
+
api_url: api_url,
|
41
|
+
api_port: api_port,
|
42
|
+
api_version: api_version,
|
43
|
+
backtrace: backtrace
|
44
|
+
)
|
45
|
+
|
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
|
13
64
|
|
14
|
-
def self.set(js_path:, download_path:)
|
15
65
|
# validate: download_path must be a string or an arrow of strings
|
16
66
|
if download_path.is_a?(String)
|
17
67
|
raise ArgumentError.new("The parameter 'download_path' must be a string or an array of strings.") if download_path.to_s.empty?
|
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.14
|
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
|