cakemail-next-gen 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/.env.dist +3 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +52 -0
  5. data/LICENSE +21 -0
  6. data/README.md +194 -0
  7. data/Rakefile +12 -0
  8. data/cakemail.gemspec +29 -0
  9. data/images/logo.png +0 -0
  10. data/lib/cakemail/base.rb +248 -0
  11. data/lib/cakemail/configuration.rb +21 -0
  12. data/lib/cakemail/connection.rb +52 -0
  13. data/lib/cakemail/contact.rb +57 -0
  14. data/lib/cakemail/list.rb +35 -0
  15. data/lib/cakemail/sender.rb +30 -0
  16. data/lib/cakemail/token.rb +59 -0
  17. data/lib/cakemail/version.rb +5 -0
  18. data/lib/cakemail.rb +21 -0
  19. data/sig/cakemail.rbs +4 -0
  20. data/vcr_cassettes/contact_create.yml +45 -0
  21. data/vcr_cassettes/contact_create_from_list.yml +45 -0
  22. data/vcr_cassettes/contact_unsubscribe.yml +45 -0
  23. data/vcr_cassettes/contact_update.yml +45 -0
  24. data/vcr_cassettes/contacts_all_without_error.yml +45 -0
  25. data/vcr_cassettes/contacts_delete.yml +45 -0
  26. data/vcr_cassettes/contacts_for_deletation.yml +45 -0
  27. data/vcr_cassettes/contacts_for_unsubscribe.yml +45 -0
  28. data/vcr_cassettes/contacts_for_update.yml +45 -0
  29. data/vcr_cassettes/contacts_lists.yml +49 -0
  30. data/vcr_cassettes/create_token.yml +45 -0
  31. data/vcr_cassettes/create_wrong_token.yml +46 -0
  32. data/vcr_cassettes/list.yml +46 -0
  33. data/vcr_cassettes/list_archive.yml +45 -0
  34. data/vcr_cassettes/list_contacts.yml +45 -0
  35. data/vcr_cassettes/list_create.yml +46 -0
  36. data/vcr_cassettes/list_delete.yml +45 -0
  37. data/vcr_cassettes/list_sender.yml +46 -0
  38. data/vcr_cassettes/list_unarchive.yml +45 -0
  39. data/vcr_cassettes/list_update.yml +46 -0
  40. data/vcr_cassettes/lists.yml +49 -0
  41. data/vcr_cassettes/lists_count.yml +47 -0
  42. data/vcr_cassettes/lists_find_in_batches.yml +93 -0
  43. data/vcr_cassettes/lists_for_archive.yml +50 -0
  44. data/vcr_cassettes/lists_for_deletation.yml +50 -0
  45. data/vcr_cassettes/lists_for_unarchive.yml +48 -0
  46. data/vcr_cassettes/lists_for_update.yml +50 -0
  47. data/vcr_cassettes/senders.yml +46 -0
  48. metadata +93 -0
@@ -0,0 +1,57 @@
1
+ module Cakemail
2
+ # @attr [String] email Email of the contact
3
+ # @attr [String] status Status ex. "active"
4
+ # @attr [Integer] subscribed_on Date of subscription (timestamp)
5
+ # @attr [Integer] bounces_count Number of bounces
6
+ # @attr [List] list List of the contact
7
+ class Contact < Base
8
+ attr_accessor :email, :status, :subscribed_on, :bounces_count
9
+
10
+ # Unsubscribe contact
11
+ #
12
+ # @return Contact
13
+ #
14
+ # @example
15
+ # contact = Cakemail::Contact.find(1, parent: list)
16
+ # contact.unsubscribe
17
+ def unsubscribe(options = {})
18
+ parent = get_parent(options)
19
+
20
+ path = "#{self.class.object_class.path}/#{id}/unsubscribe"
21
+ path = self.class.path_with_parent(path, parent) if parent
22
+
23
+ response = Cakemail.post path, {}.to_json
24
+
25
+ return response unless self.class.response_ok?(response)
26
+
27
+ self.class.instantiate_object(response["data"]) unless response.nil?
28
+ end
29
+
30
+ def self.parent_required
31
+ true
32
+ end
33
+
34
+ def self.no_parent_exception
35
+ raise Cakemail::Base::NoParentError,
36
+ "To request contacts, a list is required. Please use the parent option to pass it."
37
+ end
38
+
39
+ def self.object_class
40
+ Cakemail::Contact
41
+ end
42
+
43
+ def self.path
44
+ "contacts"
45
+ end
46
+
47
+ def initialize(options = {})
48
+ super(options)
49
+
50
+ @email = options["email"]
51
+ @status = options["status"]
52
+ @subscribed_on = options["subscribed_on"]
53
+ @bounces_count = options["bounces_count"]
54
+ @list = parent
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,35 @@
1
+ module Cakemail
2
+ # @attr [String] name Name of the list
3
+ # @attr [String] status Ex. "active"
4
+ # @attr [String] language Ex. "fr_CA"
5
+ # @attr [Integer] created_on Timestamp Ex.1688012089
6
+ # @attr [Array<Contact>] contacts The contacts of the list
7
+ class List < Base
8
+ attr_accessor :name, :status, :language, :created_on
9
+
10
+ def self.object_class
11
+ Cakemail::List
12
+ end
13
+
14
+ def self.path
15
+ "lists"
16
+ end
17
+
18
+ def contacts(options = {})
19
+ Cakemail::Contact.list(options.merge(parent: self))
20
+ end
21
+
22
+ def create_contact(params, options = {})
23
+ Cakemail::Contact.create(params, options.merge(parent: self))
24
+ end
25
+
26
+ def initialize(options = {})
27
+ super(options)
28
+
29
+ @name = options["name"]
30
+ @status = options["status"]
31
+ @language = options["language"]
32
+ @created_on = options["created_on"]
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,30 @@
1
+ module Cakemail
2
+ # @attr [String] name Name of the sender
3
+ # @attr [String] email Email of the sender
4
+ # @attr [Boolean] confirmed Is sender confirmed
5
+ # @attr [Integer] confirmed_on Timestamp Ex.1688012089
6
+ # @attr [String] language Ex. "fr_CA"
7
+ # @attr [Integer|null] last_confirmation_sent_on Timestamp Ex.1688012089
8
+ class Sender < Base
9
+ attr_accessor :name, :email, :confirmed, :confirmed_on, :language, :last_confirmation_sent_on
10
+
11
+ def self.object_class
12
+ Cakemail::Sender
13
+ end
14
+
15
+ def self.path
16
+ "brands/default/senders"
17
+ end
18
+
19
+ def initialize(options = {})
20
+ super(options)
21
+
22
+ @name = options["name"]
23
+ @email = options["email"]
24
+ @confirmed = options["confirmed"]
25
+ @confirmed_on = options["confirmed_on"]
26
+ @language = options["language"]
27
+ @last_confirmation_sent_on = options["last_confirmation_sent_on"]
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,59 @@
1
+ module Cakemail
2
+ # @attr [String] access_token
3
+ # @attr [String] refresh_token
4
+ # @attr [Integer] expires_in
5
+ # @attr [String] token_type
6
+ class Token < Base
7
+ attr_accessor :access_token, :refresh_token, :expires_in, :token_type
8
+
9
+ # Create new token with username and password provided
10
+ #
11
+ # @param username [String]
12
+ # @param password [String]
13
+ # @return [Token]
14
+ #
15
+ # @example
16
+ # token = Cakemail::Token.create('toto', 'password123')
17
+ def self.create(username = nil, password = nil)
18
+ path = object_class.path
19
+
20
+ response = Cakemail.post path, authentication_params(username, password),
21
+ { "content-type": "application/x-www-form-urlencoded" }
22
+
23
+ if response_ok? response
24
+ instantiate_object response
25
+ else
26
+ response
27
+ end
28
+ end
29
+
30
+ def self.path
31
+ "token"
32
+ end
33
+
34
+ def self.object_class
35
+ Cakemail::Token
36
+ end
37
+
38
+ def initialize(options = {})
39
+ super(options)
40
+
41
+ @access_token = options["access_token"]
42
+ @refresh_token = options["refresh_token"]
43
+ @expires_in = options["expires_in"]
44
+ @token_type = options["token_type"]
45
+ end
46
+
47
+ def self.authentication_params(username, password)
48
+ username = ENV["CAKEMAIL_USERNAME"] if username.nil?
49
+ password = ENV["CAKEMAIL_PASSWORD"] if password.nil?
50
+
51
+ {
52
+ grant_type: "password",
53
+ scopes: "user",
54
+ username: username,
55
+ password: password
56
+ }
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cakemail
4
+ VERSION = "1.0.0"
5
+ end
data/lib/cakemail.rb ADDED
@@ -0,0 +1,21 @@
1
+ require_relative "cakemail/version"
2
+ require_relative "cakemail/configuration"
3
+ require_relative "cakemail/connection"
4
+
5
+ module Cakemail
6
+ class Error < StandardError; end
7
+
8
+ def self.configure
9
+ yield Cakemail::Configuration
10
+ end
11
+
12
+ def self.config
13
+ Cakemail::Configuration
14
+ end
15
+
16
+ autoload :Base, "cakemail/base"
17
+ autoload :Token, "cakemail/token"
18
+ autoload :Sender, "cakemail/sender"
19
+ autoload :List, "cakemail/list"
20
+ autoload :Contact, "cakemail/contact"
21
+ end
data/sig/cakemail.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Cakemail
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.cakemail.dev/lists/8944823/contacts
6
+ body:
7
+ encoding: UTF-8
8
+ string: "<FILTERED>"
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:10 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '231'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"id":4,"object":"contact","created":true,"data":{"id":4,"email":"nathan.lopez042@gmail.com","status":"active","subscribed_on":1688792470,"last_bounce_type":"none","bounces_count":0,"custom_attributes":[],"tags":[],"interests":[]}}'
44
+ recorded_at: Sat, 08 Jul 2023 05:01:10 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.cakemail.dev/lists/8944823/contacts
6
+ body:
7
+ encoding: UTF-8
8
+ string: "<FILTERED>"
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:11 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '231'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"id":4,"object":"contact","created":true,"data":{"id":4,"email":"nathan.lopez042@gmail.com","status":"active","subscribed_on":1688792470,"last_bounce_type":"none","bounces_count":0,"custom_attributes":[],"tags":[],"interests":[]}}'
44
+ recorded_at: Sat, 08 Jul 2023 05:01:11 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.cakemail.dev/lists/8944823/contacts/4/unsubscribe
6
+ body:
7
+ encoding: UTF-8
8
+ string: "<FILTERED>"
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:13 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '229'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"object":"contact","subscribed":false,"data":{"id":4,"email":"1688792472@gmail.com","status":"unsubscribed","subscribed_on":1688792470,"last_bounce_type":"none","bounces_count":0,"custom_attributes":[],"tags":[],"interests":[]}}'
44
+ recorded_at: Sat, 08 Jul 2023 05:01:13 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: patch
5
+ uri: https://api.cakemail.dev/lists/8944823/contacts/4
6
+ body:
7
+ encoding: UTF-8
8
+ string: "<FILTERED>"
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:12 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '226'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"id":4,"object":"contact","updated":true,"data":{"id":4,"email":"1688792472@gmail.com","status":"active","subscribed_on":1688792470,"last_bounce_type":"none","bounces_count":0,"custom_attributes":[],"tags":[],"interests":[]}}'
44
+ recorded_at: Sat, 08 Jul 2023 05:01:12 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.cakemail.dev/lists/8944823/contacts?page=1&per_page=50
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:10 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '101'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"pagination":{"count":null,"page":1,"per_page":50,"cursor":{"previous":null,"next":null}},"data":[]}'
44
+ recorded_at: Sat, 08 Jul 2023 05:01:10 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.cakemail.dev/lists/8944823/contacts/4
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:14 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '42'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"id":4,"object":"contact","deleted":true}'
44
+ recorded_at: Sat, 08 Jul 2023 05:01:15 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.cakemail.dev/lists/8944823/contacts?page=1&per_page=50
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:14 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '283'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"pagination":{"count":null,"page":1,"per_page":50,"cursor":{"previous":null,"next":null}},"data":[{"id":4,"email":"1688792472@gmail.com","status":"unsubscribed","subscribed_on":1688792470,"last_bounce_type":"none","bounces_count":0,"custom_attributes":[],"tags":[],"interests":[]}]}'
44
+ recorded_at: Sat, 08 Jul 2023 05:01:14 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.cakemail.dev/lists/8944823/contacts?page=1&per_page=50
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:13 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '277'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"pagination":{"count":null,"page":1,"per_page":50,"cursor":{"previous":null,"next":null}},"data":[{"id":4,"email":"1688792472@gmail.com","status":"active","subscribed_on":1688792470,"last_bounce_type":"none","bounces_count":0,"custom_attributes":[],"tags":[],"interests":[]}]}'
44
+ recorded_at: Sat, 08 Jul 2023 05:01:13 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.cakemail.dev/lists/8944823/contacts?page=1&per_page=50
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:12 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '282'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"pagination":{"count":null,"page":1,"per_page":50,"cursor":{"previous":null,"next":null}},"data":[{"id":4,"email":"nathan.lopez042@gmail.com","status":"active","subscribed_on":1688792470,"last_bounce_type":"none","bounces_count":0,"custom_attributes":[],"tags":[],"interests":[]}]}'
44
+ recorded_at: Sat, 08 Jul 2023 05:01:12 GMT
45
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.cakemail.dev/lists?page=1&per_page=50
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.7.7
12
+ Accept:
13
+ - application/json
14
+ Content-Type:
15
+ - application/json
16
+ Authorization:
17
+ - Bearer <TOKEN_PLACEHOLDER>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Sat, 08 Jul 2023 05:01:09 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '583'
33
+ Connection:
34
+ - keep-alive
35
+ Vary:
36
+ - Origin
37
+ X-Krakend:
38
+ - Version 1.1.1
39
+ X-Krakend-Completed:
40
+ - 'false'
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"pagination":{"count":null,"page":1,"per_page":50},"data":[{"id":8944823,"name":"Liste
44
+ de Nathan Lopez","status":"active","language":"fr_CA","created_on":1688012089,"default_sender":{"name":"Nathan
45
+ Lopez","email":"nathan.lopez042@gmail.com"}},{"id":8947181,"name":"Test","status":"active","language":"fr_FR","created_on":1688445887,"default_sender":{"name":"Nathan
46
+ Lopez","email":"nathan.lopez042@gmail.com"}},{"id":8947185,"name":"New name","status":"active","language":"fr_CA","created_on":1688447179,"default_sender":{"name":"Nathan
47
+ Lopez","email":"nathan.lopez042@gmail.com"}}]}'
48
+ recorded_at: Sat, 08 Jul 2023 05:01:09 GMT
49
+ recorded_with: VCR 6.2.0