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,50 @@
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 04:58:33 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '754'
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"}},{"id":8950265,"name":"New name","status":"active","language":"fr_CA","created_on":1688792311,"default_sender":{"name":"Nathan
48
+ Lopez","email":"nathan.lopez042@gmail.com"}}]}'
49
+ recorded_at: Sat, 08 Jul 2023 04:58:33 GMT
50
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,50 @@
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 04:58:35 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '754'
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"}},{"id":8950265,"name":"New name","status":"active","language":"fr_CA","created_on":1688792311,"default_sender":{"name":"Nathan
48
+ Lopez","email":"nathan.lopez042@gmail.com"}}]}'
49
+ recorded_at: Sat, 08 Jul 2023 04:58:35 GMT
50
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.cakemail.dev/lists?filter=status==archived&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 04:58:34 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '407'
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":8947860,"name":"New
44
+ name","status":"archived","language":"fr_CA","created_on":1688533282,"default_sender":{"name":"Nathan
45
+ Lopez","email":"nathan.lopez042@gmail.com"}},{"id":8950265,"name":"New name","status":"archived","language":"fr_CA","created_on":1688792311,"default_sender":{"name":"Nathan
46
+ Lopez","email":"nathan.lopez042@gmail.com"}}]}'
47
+ recorded_at: Sat, 08 Jul 2023 04:58:34 GMT
48
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,50 @@
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 04:58:32 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '753'
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"}},{"id":8950265,"name":"My list","status":"active","language":"fr_CA","created_on":1688792311,"default_sender":{"name":"Nathan
48
+ Lopez","email":"nathan.lopez042@gmail.com"}}]}'
49
+ recorded_at: Sat, 08 Jul 2023 04:58:32 GMT
50
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.cakemail.dev/brands/default/senders?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 04:58:37 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '244'
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":"SpBIA10pyLsnIOnCb6Ih","name":"Nathan
44
+ Lopez","email":"nathan.lopez042@gmail.com","confirmed":true,"confirmed_on":1688011243,"language":"en_US","last_confirmation_sent_on":null}]}'
45
+ recorded_at: Sat, 08 Jul 2023 04:58:37 GMT
46
+ recorded_with: VCR 6.2.0
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cakemail-next-gen
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Nathan Lopez
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-07-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: This library allows you to quickly and easily use the Cakemail Next-gen
14
+ API via Ruby.
15
+ email:
16
+ - nathan.lopez042@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".env.dist"
22
+ - ".rspec"
23
+ - ".rubocop.yml"
24
+ - LICENSE
25
+ - README.md
26
+ - Rakefile
27
+ - cakemail.gemspec
28
+ - images/logo.png
29
+ - lib/cakemail.rb
30
+ - lib/cakemail/base.rb
31
+ - lib/cakemail/configuration.rb
32
+ - lib/cakemail/connection.rb
33
+ - lib/cakemail/contact.rb
34
+ - lib/cakemail/list.rb
35
+ - lib/cakemail/sender.rb
36
+ - lib/cakemail/token.rb
37
+ - lib/cakemail/version.rb
38
+ - sig/cakemail.rbs
39
+ - vcr_cassettes/contact_create.yml
40
+ - vcr_cassettes/contact_create_from_list.yml
41
+ - vcr_cassettes/contact_unsubscribe.yml
42
+ - vcr_cassettes/contact_update.yml
43
+ - vcr_cassettes/contacts_all_without_error.yml
44
+ - vcr_cassettes/contacts_delete.yml
45
+ - vcr_cassettes/contacts_for_deletation.yml
46
+ - vcr_cassettes/contacts_for_unsubscribe.yml
47
+ - vcr_cassettes/contacts_for_update.yml
48
+ - vcr_cassettes/contacts_lists.yml
49
+ - vcr_cassettes/create_token.yml
50
+ - vcr_cassettes/create_wrong_token.yml
51
+ - vcr_cassettes/list.yml
52
+ - vcr_cassettes/list_archive.yml
53
+ - vcr_cassettes/list_contacts.yml
54
+ - vcr_cassettes/list_create.yml
55
+ - vcr_cassettes/list_delete.yml
56
+ - vcr_cassettes/list_sender.yml
57
+ - vcr_cassettes/list_unarchive.yml
58
+ - vcr_cassettes/list_update.yml
59
+ - vcr_cassettes/lists.yml
60
+ - vcr_cassettes/lists_count.yml
61
+ - vcr_cassettes/lists_find_in_batches.yml
62
+ - vcr_cassettes/lists_for_archive.yml
63
+ - vcr_cassettes/lists_for_deletation.yml
64
+ - vcr_cassettes/lists_for_unarchive.yml
65
+ - vcr_cassettes/lists_for_update.yml
66
+ - vcr_cassettes/senders.yml
67
+ homepage: https://github.com/andrewdsilva/cakemail-ruby
68
+ licenses:
69
+ - MIT
70
+ metadata:
71
+ homepage_uri: https://github.com/andrewdsilva/cakemail-ruby
72
+ source_code_uri: https://github.com/andrewdsilva/cakemail-ruby
73
+ post_install_message:
74
+ rdoc_options: []
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: 2.6.0
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ requirements: []
88
+ rubygems_version: 3.1.6
89
+ signing_key:
90
+ specification_version: 4
91
+ summary: This library allows you to quickly and easily use the Cakemail Next-gen API
92
+ via Ruby.
93
+ test_files: []