mailerlite 1.7.0 → 1.8.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: 794fa30b6010f9a52130a140f2988dcbb1562f888e853540db3b003800a49306
4
- data.tar.gz: 0c647281e82a14f2d433b3895a0539e7ed304616fef3a5fd95720b143ec77e6e
3
+ metadata.gz: 5d8ec3996831a0bb8c319fb16ef3b2b75d6240f867295c526cd80d58ac62362d
4
+ data.tar.gz: 6508011451874fa5915283979cad2aa5f048a5b4f98e06c7d797e0d337e4087a
5
5
  SHA512:
6
- metadata.gz: 82b306fcab32c2e7cd72468c50bff48770de081e53c8277c48fb70634701acafd42742a9610651b32f8cf2c03dcfb395fb667aa5f66d19602c3532fbe90c1ef0
7
- data.tar.gz: 972ba82291ca5f0426570f2d9cbda44305d752f928015d2d85ee29d7153e656cf71e0a3b004bc22206d9ff2032aca2fb19796c1733eea328772e7b5124a1c652
6
+ metadata.gz: f3096b6e2073d225eba40df4dfd77baed6b6fe0f969a0e5854e27ca284dfa8c52da8cbaa224b9029d15142e869399446ff8041a9d71f5615ab8fac9783cff9ed
7
+ data.tar.gz: d290bcc41abc81d5278a8111323f4425ccb31b66df3f010c5cf333973b493f68b3af0f259f4de96ad041694c241c010cf5f9224b6ca06c6bde424358e693623b
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :development do
4
- gem 'rubocop', '~> 0.62'
4
+ gem 'rubocop', '~> 0.63'
5
5
  end
6
6
 
7
7
  group :development, :test do
@@ -24,6 +24,13 @@ client.campaign_action(id, action)
24
24
  client.campaign_by_status(status)
25
25
  ```
26
26
 
27
+ with options
28
+
29
+ ```ruby
30
+ client.campaign_by_status(:sent, order: :desc, limit: 5, offset: 10)
31
+ ```
32
+
33
+
27
34
  ## Remove a campaign
28
35
 
29
36
  ```ruby
@@ -6,6 +6,12 @@
6
6
  client.groups
7
7
  ```
8
8
 
9
+ with options
10
+
11
+ ```ruby
12
+ client.groups(limit: 5, offset: 10)
13
+ ```
14
+
9
15
  ## Get single group by ID
10
16
 
11
17
  ```ruby
@@ -5,3 +5,9 @@
5
5
  ```ruby
6
6
  client.segments
7
7
  ```
8
+
9
+ with options
10
+
11
+ ```ruby
12
+ client.segments(limit: 5, offset: 10, order: :desc)
13
+ ```
@@ -1,5 +1,17 @@
1
1
  # Subscribers
2
2
 
3
+ ## Get all subscribers
4
+
5
+ ```ruby
6
+ client.subscribers
7
+ ```
8
+
9
+ with options
10
+
11
+ ```ruby
12
+ client.subscribers(limit: 5, offset: 10)
13
+ ```
14
+
3
15
  ## Get single subscriber
4
16
 
5
17
  ```ruby
@@ -59,10 +59,14 @@ module MailerLite
59
59
  #
60
60
  # @param status [String] possible values: 'sent', 'outbox', 'draft'
61
61
  # no value means 'sent'
62
+ # @param options [Hash] Options list. See more in MailerLite docs.
63
+ # @option options [Integer] :offset
64
+ # @option options [Integer] :limit
65
+ # @option options [String] :order asc or desc
62
66
  #
63
67
  # @return Response from API.
64
- def campaigns_by_status(status)
65
- connection.get("campaigns/#{status}")
68
+ def campaigns_by_status(status, options = {})
69
+ connection.get("campaigns/#{status}", options)
66
70
  end
67
71
 
68
72
  # Remove a campaign.
@@ -8,9 +8,14 @@ module MailerLite
8
8
  #
9
9
  # @see https://developers.mailerlite.com/v2/reference#groups
10
10
  #
11
+ # @param options [Hash] Options list. See more in MailerLite docs.
12
+ # @option options [Integer] :offset
13
+ # @option options [Integer] :limit
14
+ # @option options [String] :filters
15
+ #
11
16
  # @return [Array] Response from API.
12
- def groups
13
- connection.get('groups')
17
+ def groups(options = {})
18
+ connection.get('groups', options)
14
19
  end
15
20
 
16
21
  # Get single group by ID
@@ -8,9 +8,14 @@ module MailerLite
8
8
  #
9
9
  # @see https://developers.mailerlite.com/v2/reference#segments-1
10
10
  #
11
+ # @param options [Hash] Options list. See more in MailerLite docs.
12
+ # @option options [Integer] :offset
13
+ # @option options [Integer] :limit
14
+ # @option options [String] :order asc or desc
15
+ #
11
16
  # @return [Array] Response from API.
12
- def segments
13
- connection.get('segments')
17
+ def segments(options = {})
18
+ connection.get('segments', options)
14
19
  end
15
20
  end
16
21
  end
@@ -4,6 +4,19 @@ module MailerLite
4
4
  module Clients
5
5
  # MailerLite Subscribers
6
6
  module Subscribers
7
+ # Get subscribers
8
+ #
9
+ # @see https://developers.mailerlite.com/v2/reference#subscribers
10
+ #
11
+ # @param options [Hash] Options list. See more in MailerLite docs.
12
+ # @option options [Integer] :offset
13
+ # @option options [Integer] :limit
14
+ #
15
+ # @return [Hash] Response from API.
16
+ def subscribers(options = {})
17
+ connection.get('subscribers', options)
18
+ end
19
+
7
20
  # Get single subscriber
8
21
  #
9
22
  # @see https://developers.mailerlite.com/v2/reference#single-subscriber
@@ -2,5 +2,5 @@
2
2
 
3
3
  module MailerLite
4
4
  # @return [String] Version number.
5
- VERSION = '1.7.0'.freeze
5
+ VERSION = '1.8.0'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailerlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justas Palumickas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-09 00:00:00.000000000 Z
11
+ date: 2019-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday