mailosaur 6.0.3 → 6.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 527f1eadb528e82ab2e1a56047b7494e1fcaf43d7d12c57c33511df5274c35f1
4
- data.tar.gz: 8216fc4682a238eeb6f29a6f0b71426b6c684c5973d50c364be0019566403599
3
+ metadata.gz: 3475cc926cf31c9b5577debbd52e17047a87bf91a344e392710e32b0b809e1f5
4
+ data.tar.gz: ac74bbbd5148cedaa4f701e31c8a0c53e0fe0260c4a7c2ecda45cb52dc92ef61
5
5
  SHA512:
6
- metadata.gz: 0da89f9b5d8c3b176e1188904a054e241b379269e20151157f0d3a4dc8080a7bc6a9f14387314b4adc2f7e794b82662444e3bc13bff0971ae8de1f11b033c928
7
- data.tar.gz: f4d7c3e0c3a10ab0f6c33ec8d0d15f24354aef15b297395afbaa010d443d2f7484d90ec4ae01760e02d444306dcb57baf74e5139aa281b589474c803bf9f6e7c
6
+ metadata.gz: 84e848dffa0cda5fdb3fc745827bcba6cbca133ea39530afaf67231c86a63da51ac21631ada1538d7fab50a5909dc47993237b9929a1d6ba4d9a38c4c8f1bd32
7
+ data.tar.gz: 78190cbf7bfa75aaf8b232b2444472e814f0320d03f8493f844ebcf8f1fdba02cd813725aa6efefb07d585da2d233e468d2e0d87880b2e7c0881c76d74d3fb02
@@ -1,3 +1,5 @@
1
+ require 'uri'
2
+
1
3
  module Mailosaur
2
4
  class Messages
3
5
  #
@@ -90,13 +92,16 @@ module Mailosaur
90
92
  # pagination.
91
93
  # @param items_per_page [Integer] A limit on the number of results to be
92
94
  # returned per page. Can be set between 1 and 1000 items, the default is 50.
95
+ # @param received_after [DateTime] Limits results to only messages received
96
+ # after this date/time.
93
97
  #
94
98
  # @return [MessageListResult] operation results.
95
99
  #
96
- def list(server, page: nil, items_per_page: nil)
100
+ def list(server, page: nil, items_per_page: nil, received_after: nil)
97
101
  url = 'api/messages?server=' + server
98
102
  url += page ? '&page=' + page : ''
99
103
  url += items_per_page ? '&itemsPerPage=' + items_per_page : ''
104
+ url += received_after ? '&receivedAfter=' + CGI.escape(received_after.iso8601) : ''
100
105
 
101
106
  response = conn.get url
102
107
 
@@ -155,7 +160,7 @@ module Mailosaur
155
160
  url = 'api/messages/search?server=' + server
156
161
  url += page ? '&page=' + page.to_s : ''
157
162
  url += items_per_page ? '&itemsPerPage=' + items_per_page.to_s : ''
158
- url += received_after ? '&receivedAfter=' + received_after.iso8601 : ''
163
+ url += received_after ? '&receivedAfter=' + CGI.escape(received_after.iso8601) : ''
159
164
 
160
165
  poll_count = 0
161
166
  start_time = Time.now.to_f
@@ -1,3 +1,3 @@
1
1
  module Mailosaur
2
- VERSION = '6.0.3'.freeze
2
+ VERSION = '6.0.4'.freeze
3
3
  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.3
4
+ version: 6.0.4
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-19 00:00:00.000000000 Z
11
+ date: 2020-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday