quickmail 0.17.0 → 0.22.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c230f03c9c4a768d9c56d94a37396841d47015b79aaf6ef96b1e46e79d3773e
4
- data.tar.gz: 97a992b510201d1473f053d46d9b6909d41af62bd2c3aa9ccacb272d2d9e0fb3
3
+ metadata.gz: eac573a71d5fdb2ce2998c32109187ca311edbeb149b41633cd901a03dc63753
4
+ data.tar.gz: 51a6cb2c03a48352928ce2b9ae391ba6fc26dfb1a65162aa42364e079cdae567
5
5
  SHA512:
6
- metadata.gz: 82f88eab0bcf157a92427aa8f9e32f91b7741e2087b22dad758b100f2122fa0ac25eac92005748054f4aa954bb9571e74b8b5e21a84a0acb8fb6a92a0ba6cb5c
7
- data.tar.gz: a50a4901fea7de01cdd1bc3a3ddc393043a2bdd9e4218aed6a964a6f07866cd343fa2628853c930ae731efeb870e5e326603754c3447b136384195ccb34b4ecb
6
+ metadata.gz: d4b796618837fe050c89f51bea819680717feef9a4af1ae34a9dd2e79d2168aed2e0a7cebe7f1c69e061c434f268cc4e0c1a047be0764ef8d44d274fb0661981
7
+ data.tar.gz: 3e03898d9972a829e9304dedb33245de4ee6deab39a41bff5542c1561751e1d9c21ad7b40397947b68649feb4f5795ac29c8b85d7c30a2093465b7365c14f7fc
@@ -47,7 +47,7 @@ module Quickmail
47
47
  end
48
48
 
49
49
  def api_base
50
- Quickmail.test_mode ? "https://quickmailonline.com.au/api/test/" : "https://quickmailonline.com.au/api/"
50
+ Quickmail.test_mode ? "https://getquickmail.com/api/test/" : "https://getquickmail.com/api/"
51
51
  end
52
52
 
53
53
  def request(method, resource, params = {}, access_token = nil)
@@ -75,15 +75,8 @@ module Quickmail
75
75
  payload: payload.to_json,
76
76
  headers: headers
77
77
  }).execute do |response, request, result|
78
- if response.code != 201 || response.code != 200
79
- raise ApiRequestError.new(
80
- response_code: response.code,
81
- response_headers: response.headers,
82
- response_body: response.to_str
83
- )
84
- end
85
- str_response = response.to_str
86
- str_response.blank? ? '' : JSON.parse(str_response)
78
+ str_response = response.to_str
79
+ str_response.blank? ? '' : JSON.parse(str_response)
87
80
  end
88
81
  end
89
82
 
@@ -7,18 +7,12 @@ module Quickmail
7
7
  def oauth(payload = {})
8
8
  RestClient::Request.new({
9
9
  method: :post,
10
- url: Quickmail.api_base + '/token',
10
+ url: Quickmail.api_base + 'token',
11
11
  payload: payload,
12
12
  headers: {content_type: "application/x-www-form-urlencoded"}
13
13
  }).execute do |response, request, result|
14
- if response.code != 200
15
- raise ApiRequestError.new(
16
- response_code: response.code,
17
- response_headers: response.headers,
18
- response_body: response.to_str
19
- )
20
- end
21
- response
14
+ str_response = response.to_str
15
+ str_response.blank? ? '' : JSON.parse(str_response)
22
16
  end
23
17
  end
24
18
  end
@@ -1,3 +1,3 @@
1
1
  module Quickmail
2
- VERSION = "0.17.0"
2
+ VERSION = "0.22.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quickmail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Dallimore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-09 00:00:00.000000000 Z
11
+ date: 2020-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client