sift_email_api 1.0.1 → 1.0.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 +4 -4
- data/lib/sift_email_api.rb +15 -3
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07a22c5182ad296dea6a8f3f887c9dad27d58a56
|
4
|
+
data.tar.gz: 8abafdaf7a47f9a951a08a9ae56359b834815479
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85181c34425cc7081b106b14559c88911a6f992cc1d65d01464cb519ec363ec2cbd53b688a24d10815630b5d5b22291ec2321f8efa5f11374a9a31a5728186f7
|
7
|
+
data.tar.gz: fbd5035e89f929f25a1e02bf7c311602d68ca22a9f5a4e1b4fe0cfbbbbd08d98a42b27d16ac74420e60afccc15bca2205eeb78c48fd5766e4b70c9714fff147d
|
data/lib/sift_email_api.rb
CHANGED
@@ -6,7 +6,7 @@ require 'connection_pool'
|
|
6
6
|
|
7
7
|
class SiftEmailApi
|
8
8
|
# @private
|
9
|
-
@@api_endpoint='api.
|
9
|
+
@@api_endpoint='api.edison.tech'
|
10
10
|
# @private
|
11
11
|
@@conn_pool = ConnectionPool.new(size: 20, timeout: 30) do
|
12
12
|
http = Net::HTTP.new(@@api_endpoint, 443)
|
@@ -63,11 +63,16 @@ class SiftEmailApi
|
|
63
63
|
#
|
64
64
|
# @param username [String] username of the user to fetch sifts for
|
65
65
|
# @param sift_id [Integer] numeric id of the sift to be fetched
|
66
|
+
# @param include_eml [Boolean] numeric id of the sift to be fetched
|
66
67
|
# @return [Hash] the sift corresponding to the provided id, available fields (by domain) documented here: {https://developer.easilydo.com/sift/documentation#flights}
|
67
|
-
def get_sift(username, sift_id)
|
68
|
+
def get_sift(username, sift_id, include_eml=false)
|
68
69
|
path = '/v1/users/%s/sifts/%d' % [username, sift_id]
|
69
70
|
params = {}
|
70
71
|
|
72
|
+
if include_eml
|
73
|
+
params['include_eml'] = 1
|
74
|
+
end
|
75
|
+
|
71
76
|
add_common_params('GET', path, params)
|
72
77
|
|
73
78
|
uri = URI::HTTPS.build({:host => @@api_endpoint, :path => path, :query => URI.encode_www_form(params)})
|
@@ -111,8 +116,11 @@ class SiftEmailApi
|
|
111
116
|
# List a user's email connections
|
112
117
|
#
|
113
118
|
# @param username [String] username of the new user
|
119
|
+
# @param offset [Integer] used for paging, where to start
|
120
|
+
# @param limit [Integer] maximum number of results to return
|
121
|
+
# @param include_invalid [Boolean] whether to return invalid accounts in the results
|
114
122
|
# @return [Array] the list of the user's connections
|
115
|
-
def list_connections(username, offset=nil, limit=nil)
|
123
|
+
def list_connections(username, offset=nil, limit=nil, include_invalid=false)
|
116
124
|
path = '/v1/users/%s/email_connections' % username
|
117
125
|
params = {}
|
118
126
|
|
@@ -124,6 +132,10 @@ class SiftEmailApi
|
|
124
132
|
params['limit'] = limit
|
125
133
|
end
|
126
134
|
|
135
|
+
if include_invalid
|
136
|
+
params['include_invalid'] = 1
|
137
|
+
end
|
138
|
+
|
127
139
|
add_common_params('GET', path, params)
|
128
140
|
|
129
141
|
uri = URI::HTTPS.build({:host => @@api_endpoint, :path => path, :query => URI.encode_www_form(params)})
|
metadata
CHANGED
@@ -1,39 +1,39 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sift_email_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carl Stritter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.2'
|
27
27
|
description: Sift identifies certain types of emails and parses email content so you
|
28
28
|
can deliver a richer experience to your users. Sift can parse emails from a variety
|
29
29
|
of domains.
|
30
|
-
email: carl@
|
30
|
+
email: carl@edison.tech
|
31
31
|
executables: []
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
35
|
- lib/sift_email_api.rb
|
36
|
-
homepage: https://developer.
|
36
|
+
homepage: https://developer.edison.tech/sift/documentation
|
37
37
|
licenses:
|
38
38
|
- MIT
|
39
39
|
metadata: {}
|
@@ -43,19 +43,18 @@ require_paths:
|
|
43
43
|
- lib
|
44
44
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: 2.0.0
|
49
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
55
|
rubyforge_project:
|
56
|
-
rubygems_version: 2.
|
56
|
+
rubygems_version: 2.5.2.3
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Ruby class for doing email parsing using EasilyDo's Sift API
|
60
60
|
test_files: []
|
61
|
-
has_rdoc:
|