base-api-io 1.4.0 → 1.5.0

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: 2f086dfdafe3a95bac7eeae96906a961d0384c0f084362764b36255e88ef020c
4
- data.tar.gz: 8a2e73d49677a5fa9abf2ab1361c5c0d3533cf70e26a3e13553321cae5643e23
3
+ metadata.gz: 03115ed6815dd53c76ccfff2afa2bcce99b45af31b1f4828b5e9852eee241fff
4
+ data.tar.gz: 86aafc849d1c51cb8bd316b8d2bcc8c33b8ede7f4a1566984bde0a92ce6c408f
5
5
  SHA512:
6
- metadata.gz: 065f852cf4e48ac7ef6a535c804b8658e2948fd474e902d7d3160ef48da0c19ffb1fbc4941fffd369dcfd7e71fa7cea61ca01b60c1b9926d528375cc988af09f
7
- data.tar.gz: ee36bec80f5c6940b9e24382da0355dcdd6eee658112bb4e2e8e8fb310347e900b0d5e4fc01e96229f7a3ffd0259dce9cc7f5d3a9c2236ef6685ea6f9789e9ac
6
+ metadata.gz: 4c93d0faa0134a7cdc46bab8c8b77a7ab839bced97d2ef0cd3d571d98c5a290770b351bebbf3e7f969463ce7744c50b83511c68da56ef473cc68f4e75fe2b68c
7
+ data.tar.gz: 2cbf6000c0b364a0eecc5ed1c843eb3ad2743a103ae4d26dafe59ca1174868c8f32016a806698c5f3afc57228f2ddc9535c1601a5e99a9e14a70a812f440ae18
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- base-api-io (1.4.0)
4
+ base-api-io (1.5.0)
5
5
  faraday (~> 0.15.4)
6
6
  mimetype-fu (~> 0.1.2)
7
7
 
data/README.md CHANGED
@@ -44,6 +44,11 @@ Just run this command: `gem install base-api-io`
44
44
  Using the `emails` endpoint on the client you can send emails:
45
45
 
46
46
  ```ruby
47
+ # List emails
48
+ emails = client.emails.list(page: 1, per_page: 10)
49
+ emails.items # The array of emails
50
+ emails.metadata # The metadata object containing the total count
51
+
47
52
  # Sending an email
48
53
  email =
49
54
  client.emails.send(
@@ -6,10 +6,20 @@ module Base
6
6
  class Emails < Endpoint
7
7
  # Initializes this endpoint.
8
8
  def initialize(access_token:, url:)
9
- @path = 'email'
9
+ @path = 'emails'
10
10
  super
11
11
  end
12
12
 
13
+ # Lists the emails of a project
14
+ def list(page: 1, per_page: 10)
15
+ request do
16
+ response =
17
+ connection.get('', per_page: per_page, page: page)
18
+
19
+ parse(response.body)
20
+ end
21
+ end
22
+
13
23
  # Sends an email with the given parameters.
14
24
  #
15
25
  # If there is no sending domain set up all emails will use the
@@ -18,7 +28,7 @@ module Base
18
28
  #
19
29
  # If there is a sending domain, the sender must match that domain
20
30
  # otherwise it will return an error.
21
- def send(subject:, from:, html:, text:, to:)
31
+ def send(subject:, from:, to:, html: nil, text: nil)
22
32
  request do
23
33
  response =
24
34
  connection.post('',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Base
4
- VERSION = '1.4.0'
4
+ VERSION = '1.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base-api-io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusztáv Szikszai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-20 00:00:00.000000000 Z
11
+ date: 2019-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday