mailerlite-ruby 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/.env.example +1 -0
  3. data/.github/workflows/main.yml +17 -0
  4. data/.github/workflows/publish_gem.yml +21 -0
  5. data/.gitignore +60 -0
  6. data/.rspec +1 -0
  7. data/.rubocop.yml +36 -0
  8. data/CHANGELOG.md +1 -0
  9. data/Gemfile +4 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +801 -0
  12. data/Rakefile +8 -0
  13. data/bin/console +8 -0
  14. data/bin/setup +8 -0
  15. data/fixtures/automations/fetch.yml +61 -0
  16. data/fixtures/automations/get.yml +68 -0
  17. data/fixtures/automations/get_subscriber_activity.yml +71 -0
  18. data/fixtures/batch/request.yml +59 -0
  19. data/fixtures/campaigns/activity.yml +64 -0
  20. data/fixtures/campaigns/create.yml +65 -0
  21. data/fixtures/campaigns/delete.yml +53 -0
  22. data/fixtures/campaigns/fetch.yml +64 -0
  23. data/fixtures/campaigns/get.yml +68 -0
  24. data/fixtures/campaigns/languages.yml +60 -0
  25. data/fixtures/campaigns/schedule.yml +160 -0
  26. data/fixtures/campaigns/update.yml +159 -0
  27. data/fixtures/fields/create.yml +57 -0
  28. data/fixtures/fields/delete.yml +53 -0
  29. data/fixtures/fields/get.yml +60 -0
  30. data/fixtures/fields/update.yml +57 -0
  31. data/fixtures/forms/delete.yml +53 -0
  32. data/fixtures/forms/fetch.yml +60 -0
  33. data/fixtures/forms/fetch_subscribers.yml +59 -0
  34. data/fixtures/forms/list.yml +62 -0
  35. data/fixtures/forms/update.yml +60 -0
  36. data/fixtures/groups/assign_subscriber.yml +58 -0
  37. data/fixtures/groups/create.yml +58 -0
  38. data/fixtures/groups/delete.yml +53 -0
  39. data/fixtures/groups/get.yml +63 -0
  40. data/fixtures/groups/get_subscribers.yml +62 -0
  41. data/fixtures/groups/unassign_subscriber.yml +53 -0
  42. data/fixtures/groups/update.yml +58 -0
  43. data/fixtures/segments/delete.yml +53 -0
  44. data/fixtures/segments/get_subscribers.yml +61 -0
  45. data/fixtures/segments/list.yml +60 -0
  46. data/fixtures/segments/update.yml +58 -0
  47. data/fixtures/subscribers/create.yml +57 -0
  48. data/fixtures/subscribers/delete.yml +51 -0
  49. data/fixtures/subscribers/fetch.yml +68 -0
  50. data/fixtures/subscribers/fetch_count.yml +55 -0
  51. data/fixtures/subscribers/get.yml +62 -0
  52. data/fixtures/timezones/list.yml +575 -0
  53. data/fixtures/webhooks/create.yml +58 -0
  54. data/fixtures/webhooks/delete.yml +53 -0
  55. data/fixtures/webhooks/get.yml +58 -0
  56. data/fixtures/webhooks/list.yml +61 -0
  57. data/fixtures/webhooks/update.yml +58 -0
  58. data/lib/mailerlite/automations/automations.rb +62 -0
  59. data/lib/mailerlite/batch/batch.rb +24 -0
  60. data/lib/mailerlite/campaigns/campaigns.rb +216 -0
  61. data/lib/mailerlite/client.rb +35 -0
  62. data/lib/mailerlite/fields/fields.rb +61 -0
  63. data/lib/mailerlite/forms/forms.rb +73 -0
  64. data/lib/mailerlite/groups/groups.rb +90 -0
  65. data/lib/mailerlite/segments/segments.rb +62 -0
  66. data/lib/mailerlite/subscribers/subscribers.rb +116 -0
  67. data/lib/mailerlite/timezones/timezones.rb +22 -0
  68. data/lib/mailerlite/version.rb +5 -0
  69. data/lib/mailerlite/webhooks/webhooks.rb +67 -0
  70. data/lib/mailerlite-ruby.rb +3 -0
  71. data/lib/mailerlite.rb +13 -0
  72. data/mailerlite-ruby.gemspec +42 -0
  73. data/renovate.json +5 -0
  74. data/spec/automations_rspec.rb +63 -0
  75. data/spec/batches_rspec.rb +41 -0
  76. data/spec/campaigns_rspec.rb +155 -0
  77. data/spec/fields_rspec.rb +70 -0
  78. data/spec/forms_rspec.rb +81 -0
  79. data/spec/groups_rspec.rb +97 -0
  80. data/spec/segments_rspec.rb +70 -0
  81. data/spec/spec_helper.rb +101 -0
  82. data/spec/subscribers_rspec.rb +84 -0
  83. data/spec/timezones_rspec.rb +36 -0
  84. data/spec/webhooks_rspec.rb +86 -0
  85. metadata +303 -0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://connect.mailerlite.com/api/groups/75138589423306653
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"test_group3"}'
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 21 Dec 2022 21:23:52 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - close
35
+ Cache-Control:
36
+ - no-cache, private
37
+ X-Locale:
38
+ - en
39
+ X-Ratelimit-Limit:
40
+ - '120'
41
+ X-Ratelimit-Remaining:
42
+ - '118'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Strict-Transport-Security:
46
+ - max-age=15724800; includeSubDomains
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Server:
50
+ - cloudflare
51
+ Cf-Ray:
52
+ - 77d3ae697e08d1d4-MCT
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"data":{"id":"75138589423306653","name":"test_group3","active_count":0,"sent_count":0,"opens_count":0,"open_rate":{"float":0,"string":"0%"},"clicks_count":0,"click_rate":{"float":0,"string":"0%"},"unsubscribed_count":0,"unconfirmed_count":0,"bounced_count":0,"junk_count":0,"created_at":"2022-12-21
56
+ 21:22:22"}}'
57
+ recorded_at: Wed, 21 Dec 2022 21:23:49 GMT
58
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://connect.mailerlite.com/api/segments/75140256628737109
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 204
25
+ message: No Content
26
+ headers:
27
+ Date:
28
+ - Wed, 21 Dec 2022 21:54:32 GMT
29
+ Connection:
30
+ - close
31
+ Cache-Control:
32
+ - no-cache, private
33
+ X-Locale:
34
+ - en
35
+ X-Ratelimit-Limit:
36
+ - '120'
37
+ X-Ratelimit-Remaining:
38
+ - '118'
39
+ Access-Control-Allow-Origin:
40
+ - "*"
41
+ Strict-Transport-Security:
42
+ - max-age=15724800; includeSubDomains
43
+ Cf-Cache-Status:
44
+ - DYNAMIC
45
+ Server:
46
+ - cloudflare
47
+ Cf-Ray:
48
+ - 77d3db56af89de53-MCT
49
+ body:
50
+ encoding: ASCII-8BIT
51
+ string: ''
52
+ recorded_at: Wed, 21 Dec 2022 21:54:29 GMT
53
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://connect.mailerlite.com/api/segments/75140256628737109/subscribers
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 21 Dec 2022 21:53:49 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - close
35
+ Cache-Control:
36
+ - no-cache, private
37
+ X-Locale:
38
+ - en
39
+ X-Ratelimit-Limit:
40
+ - '120'
41
+ X-Ratelimit-Remaining:
42
+ - '119'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Strict-Transport-Security:
46
+ - max-age=15724800; includeSubDomains
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Server:
50
+ - cloudflare
51
+ Cf-Ray:
52
+ - 77d3da492d7bde57-MCT
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"data":[{"id":"75009808379414225","email":"second@email.com","status":"active","source":"import","sent":0,"opens_count":0,"clicks_count":0,"open_rate":0,"click_rate":0,"ip_address":null,"subscribed_at":"2022-12-20
56
+ 11:15:27","unsubscribed_at":null,"created_at":"2022-12-20 11:15:27","updated_at":"2022-12-21
57
+ 18:32:20","fields":{"name":null,"last_name":null,"company":null,"country":null,"city":null,"phone":null,"state":null,"z_i_p":null},"groups":[],"opted_in_at":null,"optin_ip":null},{"id":"75009808377317072","email":"first@email.com","status":"active","source":"import","sent":0,"opens_count":0,"clicks_count":0,"open_rate":0,"click_rate":0,"ip_address":null,"subscribed_at":"2022-12-20
58
+ 11:15:27","unsubscribed_at":null,"created_at":"2022-12-20 11:15:27","updated_at":"2022-12-21
59
+ 18:32:20","fields":{"name":null,"last_name":null,"company":null,"country":null,"city":null,"phone":null,"state":null,"z_i_p":null},"groups":[],"opted_in_at":null,"optin_ip":null}],"meta":{"total":2,"count":2,"last":75009808377317072}}'
60
+ recorded_at: Wed, 21 Dec 2022 21:53:47 GMT
61
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,60 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://connect.mailerlite.com/api/segments
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Fri, 23 Dec 2022 21:16:48 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - close
35
+ Cache-Control:
36
+ - no-cache, private
37
+ X-Locale:
38
+ - en
39
+ X-Ratelimit-Limit:
40
+ - '120'
41
+ X-Ratelimit-Remaining:
42
+ - '119'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Strict-Transport-Security:
46
+ - max-age=15724800; includeSubDomains
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Server:
50
+ - cloudflare
51
+ Cf-Ray:
52
+ - 77e41ecf8b15d1e4-MCT
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"data":[{"id":"75230139503346765","name":"test_segment2","total":4,"open_rate":{"float":1,"string":"100%"},"click_rate":{"float":0,"string":"0%"},"created_at":"2022-12-22
56
+ 21:37:31"}],"links":{"first":"https:\/\/connect.mailerlite.com\/api\/segments?page=1","last":"https:\/\/connect.mailerlite.com\/api\/segments?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo;
57
+ Previous","active":false},{"url":"https:\/\/connect.mailerlite.com\/api\/segments?page=1","label":"1","active":true},{"url":null,"label":"Next
58
+ &raquo;","active":false}],"path":"https:\/\/connect.mailerlite.com\/api\/segments","per_page":250,"to":1,"total":1}}'
59
+ recorded_at: Fri, 23 Dec 2022 21:16:47 GMT
60
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://connect.mailerlite.com/api/segments/75140256628737109
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"test_segment2"}'
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 21 Dec 2022 21:53:09 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - close
35
+ Cache-Control:
36
+ - no-cache, private
37
+ X-Locale:
38
+ - en
39
+ X-Ratelimit-Limit:
40
+ - '120'
41
+ X-Ratelimit-Remaining:
42
+ - '116'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Strict-Transport-Security:
46
+ - max-age=15724800; includeSubDomains
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Server:
50
+ - cloudflare
51
+ Cf-Ray:
52
+ - 77d3d94c7d26de47-MCT
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"data":{"id":"75140256628737109","name":"test_segment2","total":2,"open_rate":{"float":0,"string":"0%"},"click_rate":{"float":0,"string":"0%"},"created_at":"2022-12-21
56
+ 21:48:52"}}'
57
+ recorded_at: Wed, 21 Dec 2022 21:53:06 GMT
58
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://connect.mailerlite.com/api/subscribers
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"email":"user@example.com"}'
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 07 Dec 2022 22:09:46 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - close
35
+ Cache-Control:
36
+ - no-cache, private
37
+ X-Ratelimit-Limit:
38
+ - '120'
39
+ X-Ratelimit-Remaining:
40
+ - '117'
41
+ Access-Control-Allow-Origin:
42
+ - "*"
43
+ Strict-Transport-Security:
44
+ - max-age=15724800; includeSubDomains
45
+ Cf-Cache-Status:
46
+ - DYNAMIC
47
+ Server:
48
+ - cloudflare
49
+ Cf-Ray:
50
+ - 776096643ba4d1d0-MCT
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"data":{"id":"73871649530709291","email":"user@example.com","status":"active","source":"api","sent":0,"opens_count":0,"clicks_count":0,"open_rate":0,"click_rate":0,"ip_address":null,"subscribed_at":"2022-12-07
54
+ 21:44:54","unsubscribed_at":null,"created_at":"2022-12-07 21:44:54","updated_at":"2022-12-07
55
+ 22:07:37","fields":{"name":null,"last_name":null,"company":null,"country":null,"city":null,"phone":null,"state":null,"z_i_p":null},"groups":[],"location":null,"opted_in_at":null,"optin_ip":null}}'
56
+ recorded_at: Wed, 07 Dec 2022 22:09:46 GMT
57
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://connect.mailerlite.com/api/subscribers/73871649530709291
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 204
25
+ message: No Content
26
+ headers:
27
+ Date:
28
+ - Wed, 07 Dec 2022 22:09:47 GMT
29
+ Connection:
30
+ - close
31
+ Cache-Control:
32
+ - no-cache, private
33
+ X-Ratelimit-Limit:
34
+ - '120'
35
+ X-Ratelimit-Remaining:
36
+ - '114'
37
+ Access-Control-Allow-Origin:
38
+ - "*"
39
+ Strict-Transport-Security:
40
+ - max-age=15724800; includeSubDomains
41
+ Cf-Cache-Status:
42
+ - DYNAMIC
43
+ Server:
44
+ - cloudflare
45
+ Cf-Ray:
46
+ - 7760966ffb87de4b-MCT
47
+ body:
48
+ encoding: ASCII-8BIT
49
+ string: ''
50
+ recorded_at: Wed, 07 Dec 2022 22:09:47 GMT
51
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://connect.mailerlite.com/api/subscribers?filter%5Bstatus%5D=active
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Fri, 23 Dec 2022 21:03:41 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - close
35
+ Cache-Control:
36
+ - no-cache, private
37
+ X-Locale:
38
+ - en
39
+ X-Ratelimit-Limit:
40
+ - '120'
41
+ X-Ratelimit-Remaining:
42
+ - '119'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Strict-Transport-Security:
46
+ - max-age=15724800; includeSubDomains
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Server:
50
+ - cloudflare
51
+ Cf-Ray:
52
+ - 77e40b99cbd0d1ec-MCT
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"data":[{"id":"75030636641911843","email":"igor@hrcek.rs","status":"active","source":"webform","sent":1,"opens_count":1,"clicks_count":0,"open_rate":100,"click_rate":0,"ip_address":"89.216.27.147","subscribed_at":"2022-12-20
56
+ 16:46:31","unsubscribed_at":null,"created_at":"2022-12-20 16:46:31","updated_at":"2022-12-21
57
+ 07:45:50","fields":{"name":null,"last_name":null,"company":null,"country":null,"city":null,"phone":null,"state":null,"z_i_p":null},"opted_in_at":"2022-12-20
58
+ 16:46:42","optin_ip":"89.216.27.147"},{"id":"75009808379414225","email":"second@email.com","status":"active","source":"import","sent":0,"opens_count":0,"clicks_count":0,"open_rate":0,"click_rate":0,"ip_address":null,"subscribed_at":"2022-12-20
59
+ 11:15:27","unsubscribed_at":null,"created_at":"2022-12-20 11:15:27","updated_at":"2022-12-21
60
+ 18:32:20","fields":{"name":null,"last_name":null,"company":null,"country":null,"city":"Lajpcig","phone":null,"state":null,"z_i_p":null},"opted_in_at":null,"optin_ip":null},{"id":"75009808377317072","email":"first@email.com","status":"active","source":"import","sent":0,"opens_count":0,"clicks_count":0,"open_rate":0,"click_rate":0,"ip_address":null,"subscribed_at":"2022-12-20
61
+ 11:15:27","unsubscribed_at":null,"created_at":"2022-12-20 11:15:27","updated_at":"2022-12-21
62
+ 18:32:20","fields":{"name":null,"last_name":null,"company":null,"country":null,"city":"Lajpcig","phone":null,"state":null,"z_i_p":null},"opted_in_at":null,"optin_ip":null},{"id":"75005710539163012","email":"some3@email.com","status":"active","source":"api","sent":0,"opens_count":0,"clicks_count":0,"open_rate":0,"click_rate":0,"ip_address":null,"subscribed_at":"2022-12-20
63
+ 10:10:19","unsubscribed_at":null,"created_at":"2022-12-20 10:10:19","updated_at":"2022-12-20
64
+ 10:10:19","fields":{"name":null,"last_name":null,"company":null,"country":null,"city":null,"phone":null,"state":null,"z_i_p":null},"opted_in_at":null,"optin_ip":null},{"id":"73931277474989872","email":"sdk@mailerlite.com","status":"active","source":"manual","sent":2,"opens_count":2,"clicks_count":0,"open_rate":100,"click_rate":0,"ip_address":null,"subscribed_at":"2022-12-08
65
+ 13:32:40","unsubscribed_at":null,"created_at":"2022-12-08 13:32:40","updated_at":"2022-12-20
66
+ 18:45:03","fields":{"name":"SDK","last_name":null,"company":null,"country":null,"city":"Lajpcig","phone":null,"state":null,"z_i_p":null},"opted_in_at":null,"optin_ip":null}],"links":{"first":null,"last":null,"prev":null,"next":null},"meta":{"path":"https:\/\/connect.mailerlite.com\/api\/subscribers","per_page":25,"next_cursor":null,"prev_cursor":null}}'
67
+ recorded_at: Fri, 23 Dec 2022 21:03:40 GMT
68
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://connect.mailerlite.com/api/subscribers/?limit=0
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 07 Dec 2022 22:09:47 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - close
35
+ Cache-Control:
36
+ - no-cache, private
37
+ X-Ratelimit-Limit:
38
+ - '120'
39
+ X-Ratelimit-Remaining:
40
+ - '115'
41
+ Access-Control-Allow-Origin:
42
+ - "*"
43
+ Strict-Transport-Security:
44
+ - max-age=15724800; includeSubDomains
45
+ Cf-Cache-Status:
46
+ - DYNAMIC
47
+ Server:
48
+ - cloudflare
49
+ Cf-Ray:
50
+ - 7760966d0aa9d1d4-MCT
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"total":2}'
54
+ recorded_at: Wed, 07 Dec 2022 22:09:47 GMT
55
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://connect.mailerlite.com/api/subscribers/second@email.com
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerLite-client-ruby/0.1.1
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - connect.mailerlite.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Fri, 23 Dec 2022 21:05:09 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - close
35
+ Cache-Control:
36
+ - no-cache, private
37
+ X-Locale:
38
+ - en
39
+ X-Ratelimit-Limit:
40
+ - '120'
41
+ X-Ratelimit-Remaining:
42
+ - '119'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Strict-Transport-Security:
46
+ - max-age=15724800; includeSubDomains
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Server:
50
+ - cloudflare
51
+ Cf-Ray:
52
+ - 77e40dbfed54d1cc-MCT
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"data":{"id":"75009808379414225","email":"second@email.com","status":"active","source":"import","sent":0,"opens_count":0,"clicks_count":0,"open_rate":0,"click_rate":0,"ip_address":null,"subscribed_at":"2022-12-20
56
+ 11:15:27","unsubscribed_at":null,"created_at":"2022-12-20 11:15:27","updated_at":"2022-12-21
57
+ 18:32:20","fields":{"name":null,"last_name":null,"company":null,"country":null,"city":"Lajpcig","phone":null,"state":null,"z_i_p":null},"groups":[{"id":"75011449370445335","name":"My
58
+ Group","active_count":4,"sent_count":3,"opens_count":3,"open_rate":{"float":1,"string":"100%"},"clicks_count":0,"click_rate":{"float":0,"string":"0%"},"unsubscribed_count":0,"unconfirmed_count":2,"bounced_count":0,"junk_count":0,"created_at":"2022-12-20
59
+ 11:41:32"},{"id":"75138838590129612","name":"SMmwGofyQP","active_count":1,"sent_count":1,"opens_count":1,"open_rate":{"float":1,"string":"100%"},"clicks_count":0,"click_rate":{"float":0,"string":"0%"},"unsubscribed_count":0,"unconfirmed_count":0,"bounced_count":0,"junk_count":0,"created_at":"2022-12-21
60
+ 21:26:20"}],"opted_in_at":null,"optin_ip":null}}'
61
+ recorded_at: Fri, 23 Dec 2022 21:05:08 GMT
62
+ recorded_with: VCR 6.1.0