sift_email_api 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sift_email_api.rb +15 -3
  3. metadata +9 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eda74a4d7338d52d003426dee77be9599a8771b3
4
- data.tar.gz: 5c2ac7fd7e3d87214b413fd4824bdb494f0e6421
3
+ metadata.gz: 07a22c5182ad296dea6a8f3f887c9dad27d58a56
4
+ data.tar.gz: 8abafdaf7a47f9a951a08a9ae56359b834815479
5
5
  SHA512:
6
- metadata.gz: 99cb84d7af08bdeb58e0c387b2a7e89cbad361615aa5c9c31616e2224bf381d139585dd3f52eb529721325f7173322fe9c9101063807e50fa54447d2c23a58bc
7
- data.tar.gz: b9deaf343a6c4d6d6f5a6759a7dfae2e948ec3639ddd4341fd1c6fa55ed26b3e64e8929d5a9a4bf5d7dc061d33f88a68ad58488e1f0fe5b4c4738c57bfb695f4
6
+ metadata.gz: 85181c34425cc7081b106b14559c88911a6f992cc1d65d01464cb519ec363ec2cbd53b688a24d10815630b5d5b22291ec2321f8efa5f11374a9a31a5728186f7
7
+ data.tar.gz: fbd5035e89f929f25a1e02bf7c311602d68ca22a9f5a4e1b4fe0cfbbbbd08d98a42b27d16ac74420e60afccc15bca2205eeb78c48fd5766e4b70c9714fff147d
@@ -6,7 +6,7 @@ require 'connection_pool'
6
6
 
7
7
  class SiftEmailApi
8
8
  # @private
9
- @@api_endpoint='api.easilydo.com'
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.1
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: 2017-03-15 00:00:00.000000000 Z
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@easilydo.com
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.easilydo.com/sift/documentation
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.0.14
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: