braze_ruby 0.3.2 → 0.5.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.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +57 -0
  3. data/.circleci/gem_credentials +2 -0
  4. data/.circleci/setup-rubygems +6 -0
  5. data/.gitignore +12 -19
  6. data/.standard.yml +1 -0
  7. data/Gemfile +1 -2
  8. data/LICENSE.txt +17 -18
  9. data/README.md +49 -2
  10. data/Rakefile +2 -1
  11. data/bin/release +16 -0
  12. data/braze_ruby.gemspec +28 -31
  13. data/lib/braze_ruby.rb +4 -4
  14. data/lib/braze_ruby/api.rb +20 -14
  15. data/lib/braze_ruby/deprecated.rb +4 -4
  16. data/lib/braze_ruby/endpoints.rb +10 -7
  17. data/lib/braze_ruby/endpoints/campaigns.rb +1 -1
  18. data/lib/braze_ruby/endpoints/canvas.rb +2 -2
  19. data/lib/braze_ruby/endpoints/create_user_aliases.rb +19 -0
  20. data/lib/braze_ruby/endpoints/delete_users.rb +2 -2
  21. data/lib/braze_ruby/endpoints/email_status.rb +1 -1
  22. data/lib/braze_ruby/endpoints/email_sync.rb +2 -2
  23. data/lib/braze_ruby/endpoints/identify_users.rb +2 -2
  24. data/lib/braze_ruby/endpoints/remove_external_ids.rb +19 -0
  25. data/lib/braze_ruby/endpoints/rename_external_ids.rb +19 -0
  26. data/lib/braze_ruby/endpoints/schedule_messages.rb +1 -1
  27. data/lib/braze_ruby/endpoints/send_messages.rb +1 -1
  28. data/lib/braze_ruby/endpoints/subscription.rb +3 -4
  29. data/lib/braze_ruby/endpoints/track_users.rb +5 -5
  30. data/lib/braze_ruby/http.rb +21 -8
  31. data/lib/braze_ruby/rest.rb +20 -17
  32. data/lib/braze_ruby/rest/base.rb +5 -3
  33. data/lib/braze_ruby/rest/canvas_details.rb +4 -6
  34. data/lib/braze_ruby/rest/create_user_aliases.rb +13 -0
  35. data/lib/braze_ruby/rest/delete_users.rb +3 -4
  36. data/lib/braze_ruby/rest/email_hard_bounces.rb +4 -6
  37. data/lib/braze_ruby/rest/email_status.rb +6 -8
  38. data/lib/braze_ruby/rest/email_unsubscribes.rb +4 -6
  39. data/lib/braze_ruby/rest/export_users.rb +9 -11
  40. data/lib/braze_ruby/rest/identify_users.rb +3 -4
  41. data/lib/braze_ruby/rest/list_segments.rb +2 -4
  42. data/lib/braze_ruby/rest/remove_external_ids.rb +13 -0
  43. data/lib/braze_ruby/rest/rename_external_ids.rb +13 -0
  44. data/lib/braze_ruby/rest/schedule_messages.rb +9 -11
  45. data/lib/braze_ruby/rest/send_messages.rb +6 -8
  46. data/lib/braze_ruby/rest/subscription_status_get.rb +4 -6
  47. data/lib/braze_ruby/rest/subscription_status_set.rb +4 -6
  48. data/lib/braze_ruby/rest/subscription_user_status.rb +4 -6
  49. data/lib/braze_ruby/rest/track_users.rb +5 -6
  50. data/lib/braze_ruby/rest/trigger_campaign_send.rb +4 -8
  51. data/lib/braze_ruby/rest/trigger_canvas_send.rb +4 -6
  52. data/lib/braze_ruby/version.rb +1 -1
  53. metadata +61 -175
  54. data/.github/workflows/ci.yml +0 -19
  55. data/Gemfile.lock +0 -78
  56. data/spec/braze_ruby/api_spec.rb +0 -6
  57. data/spec/braze_ruby/endpoints/delete_users_spec.rb +0 -31
  58. data/spec/braze_ruby/endpoints/track_users_spec.rb +0 -74
  59. data/spec/braze_ruby/rest/delete_users_spec.rb +0 -22
  60. data/spec/braze_ruby/rest/email_status_spec.rb +0 -21
  61. data/spec/braze_ruby/rest/export_users_spec.rb +0 -21
  62. data/spec/braze_ruby/rest/identify_users_spec.rb +0 -23
  63. data/spec/braze_ruby/rest/schedule_messages_spec.rb +0 -38
  64. data/spec/braze_ruby/rest/send_messages_spec.rb +0 -35
  65. data/spec/braze_ruby/rest/track_users_spec.rb +0 -26
  66. data/spec/factories.rb +0 -38
  67. data/spec/fixtures/responses/campaigns/trigger_send/sends_an_email.yml +0 -69
  68. data/spec/fixtures/responses/canvas/details/returns_error_when_no_canvas.yml +0 -67
  69. data/spec/fixtures/responses/canvas/trigger_send/sends_a_canvas.yml +0 -69
  70. data/spec/fixtures/responses/delete_users/unauthorized/responds_with_unauthorized.yml +0 -66
  71. data/spec/fixtures/responses/delete_users/with_success/responds_with_created.yml +0 -69
  72. data/spec/fixtures/responses/delete_users/with_success/responds_with_success_message.yml +0 -69
  73. data/spec/fixtures/responses/email_status/existing_email/responds_with_created.yml +0 -69
  74. data/spec/fixtures/responses/email_status/existing_email/responds_with_success_message.yml +0 -69
  75. data/spec/fixtures/responses/email_status/unknown_email/responds_with_bad_request.yml +0 -69
  76. data/spec/fixtures/responses/email_status/unknown_email/responds_with_success_message.yml +0 -69
  77. data/spec/fixtures/responses/email_sync/hard_bounces/responds_with_empty_array_when_no_hard_bounces.yml +0 -73
  78. data/spec/fixtures/responses/email_sync/unsubscribes/responds_with_empty_array_when_no_unsubscribes.yml +0 -73
  79. data/spec/fixtures/responses/email_sync/unsubscribes/responds_with_unsubscribed_emails.yml +0 -74
  80. data/spec/fixtures/responses/export_users/by_ids/with_success/responds_with_created.yml +0 -69
  81. data/spec/fixtures/responses/export_users/by_segment/with_success/responds_with_created.yml +0 -69
  82. data/spec/fixtures/responses/identify_users/unauthorized/responds_with_unauthorized.yml +0 -66
  83. data/spec/fixtures/responses/identify_users/with_success/responds_with_created.yml +0 -69
  84. data/spec/fixtures/responses/identify_users/with_success/responds_with_success_message.yml +0 -69
  85. data/spec/fixtures/responses/list_segments/with_success/responds_with_a_list_of_segments.yml +0 -81
  86. data/spec/fixtures/responses/list_segments/with_success/responds_with_success.yml +0 -81
  87. data/spec/fixtures/responses/schedule_messages/unauthorized/responds_with_unauthorize.yml +0 -67
  88. data/spec/fixtures/responses/schedule_messages/with_success/responds_with_created.yml +0 -70
  89. data/spec/fixtures/responses/schedule_messages/with_success/responds_with_success_message.yml +0 -70
  90. data/spec/fixtures/responses/send_messages/unauthorized/responds_with_unauthorized.yml +0 -66
  91. data/spec/fixtures/responses/send_messages/with_success/responds_with_created.yml +0 -69
  92. data/spec/fixtures/responses/send_messages/with_success/responds_with_success_message.yml +0 -69
  93. data/spec/fixtures/responses/subscription/subscription_status_set/when_subscribing/subscribes_the_user.yml +0 -69
  94. data/spec/fixtures/responses/subscription/subscription_status_set/when_subscription_group_does_not_exist/returns_an_error_status.yml +0 -66
  95. data/spec/fixtures/responses/subscription/subscription_status_set/when_unsubscribing/unsubscribes_the_user.yml +0 -135
  96. data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_status_get/when_checking_subscribed_and_unsubscribed_user_status/returns_only_users_that_were_once_subscribed.yml +0 -205
  97. data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_status_get/when_group_does_not_exist/returns_an_error.yml +0 -193
  98. data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_user_status/returns_subscription_groups_and_status_for_every_group.yml +0 -207
  99. data/spec/fixtures/responses/track_users/unauthorized/responds_with_unauthorized.yml +0 -68
  100. data/spec/fixtures/responses/track_users/with_success/responds_with_created.yml +0 -71
  101. data/spec/fixtures/responses/track_users/with_success/responds_with_success_message.yml +0 -71
  102. data/spec/integrations/campaigns_spec.rb +0 -17
  103. data/spec/integrations/canvas_spec.rb +0 -26
  104. data/spec/integrations/delete_users_spec.rb +0 -31
  105. data/spec/integrations/email_status_spec.rb +0 -38
  106. data/spec/integrations/email_sync_spec.rb +0 -31
  107. data/spec/integrations/export_users_spec.rb +0 -29
  108. data/spec/integrations/identify_users_spec.rb +0 -32
  109. data/spec/integrations/list_segments_spec.rb +0 -21
  110. data/spec/integrations/schedule_messages_spec.rb +0 -33
  111. data/spec/integrations/send_messages_spec.rb +0 -32
  112. data/spec/integrations/subscription_spec.rb +0 -149
  113. data/spec/integrations/track_users_spec.rb +0 -37
  114. data/spec/spec_helper.rb +0 -33
  115. data/spec/support/factory_bot.rb +0 -12
  116. data/spec/support/integrations.rb +0 -23
  117. data/spec/support/vcr.rb +0 -18
@@ -1,69 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: "<BRAZE_REST_URL>/users/export/segment"
6
- body:
7
- encoding: UTF-8
8
- string: '{"api_key":"<BRAZE_REST_API_KEY>","segment_id":"a8fde797-4c44-4406-8e6c-5850d323f169","callback_endpoint":"https://example.com"}'
9
- headers:
10
- User-Agent:
11
- - Faraday v0.14.0
12
- Content-Type:
13
- - application/json
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 201
21
- message: Created
22
- headers:
23
- Cache-Control:
24
- - max-age=0, private, must-revalidate
25
- Content-Type:
26
- - application/json
27
- Etag:
28
- - W/"3ea7dd8571456c18ee0f64e21588cd18"
29
- Server:
30
- - nginx
31
- Strict-Transport-Security:
32
- - max-age=0; includeSubDomains
33
- - max-age=31536000; includeSubDomains
34
- X-Ratelimit-Limit:
35
- - '50000'
36
- X-Ratelimit-Remaining:
37
- - '49994'
38
- X-Ratelimit-Reset:
39
- - '1524002400'
40
- X-Request-Id:
41
- - 383a399b-8622-432b-8e8c-3466bb2918aa
42
- X-Runtime:
43
- - '0.019441'
44
- Content-Length:
45
- - '193'
46
- Accept-Ranges:
47
- - bytes
48
- Date:
49
- - Tue, 17 Apr 2018 21:08:20 GMT
50
- Via:
51
- - 1.1 varnish
52
- Connection:
53
- - keep-alive
54
- X-Served-By:
55
- - cache-pdk17823-PDK
56
- X-Cache:
57
- - MISS
58
- X-Cache-Hits:
59
- - '0'
60
- X-Timer:
61
- - S1523999301.520355,VS0,VE192
62
- Vary:
63
- - Accept-Encoding
64
- body:
65
- encoding: ASCII-8BIT
66
- string: '{"url":"https://appboy-03-data-export.s3.amazonaws.com/6GyY08ekLymivv4VS0uQFeWV1yP1OV99jgrGSJ4MmYg.zip","object_prefix":"9665a629-c9b2-499b-a2d8-f1f6fc19cf64-1523999300","message":"success"}'
67
- http_version:
68
- recorded_at: Tue, 17 Apr 2018 21:08:20 GMT
69
- recorded_with: VCR 4.0.0
@@ -1,66 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: "<BRAZE_REST_URL>/users/identify"
6
- body:
7
- encoding: UTF-8
8
- string: '{"api_key":"non-existent","aliases_to_identify":[{"external_id":400,"user_alias":{"alias_name":"abc","alias_label":"foo"}}]}'
9
- headers:
10
- Content-Type:
11
- - application/json
12
- Accept:
13
- - application/json
14
- User-Agent:
15
- - Braze Ruby gem v0.3.2
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- response:
19
- status:
20
- code: 401
21
- message: Unauthorized
22
- headers:
23
- Connection:
24
- - keep-alive
25
- Content-Length:
26
- - '69'
27
- Cache-Control:
28
- - no-cache
29
- Content-Type:
30
- - application/json
31
- Server:
32
- - nginx
33
- Strict-Transport-Security:
34
- - max-age=0; includeSubDomains
35
- X-Ratelimit-Limit:
36
- - ''
37
- X-Ratelimit-Remaining:
38
- - ''
39
- X-Ratelimit-Reset:
40
- - ''
41
- X-Request-Id:
42
- - 8bd7f08e-2a28-4cac-af20-26dbf479eeb2
43
- X-Runtime:
44
- - '0.006500'
45
- Accept-Ranges:
46
- - bytes
47
- Date:
48
- - Thu, 19 Dec 2019 20:55:45 GMT
49
- Via:
50
- - 1.1 varnish
51
- X-Served-By:
52
- - cache-msp20825-MSP
53
- X-Cache:
54
- - MISS
55
- X-Cache-Hits:
56
- - '0'
57
- X-Timer:
58
- - S1576788945.296140,VS0,VE43
59
- Vary:
60
- - Origin,Accept-Encoding
61
- body:
62
- encoding: ASCII-8BIT
63
- string: '{"message":"Invalid API key: non-existent"}'
64
- http_version:
65
- recorded_at: Thu, 19 Dec 2019 20:55:45 GMT
66
- recorded_with: VCR 5.0.0
@@ -1,69 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: "<BRAZE_REST_URL>/users/identify"
6
- body:
7
- encoding: UTF-8
8
- string: '{"api_key":"<BRAZE_REST_API_KEY>","aliases_to_identify":[{"external_id":400,"user_alias":{"alias_name":"abc","alias_label":"foo"}}]}'
9
- headers:
10
- Content-Type:
11
- - application/json
12
- Accept:
13
- - application/json
14
- User-Agent:
15
- - Braze Ruby gem v0.3.2
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- response:
19
- status:
20
- code: 201
21
- message: Created
22
- headers:
23
- Connection:
24
- - keep-alive
25
- Content-Length:
26
- - '66'
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- Content-Type:
30
- - application/json
31
- Etag:
32
- - W/"da612bda0a786bcb949da037e296a092"
33
- Server:
34
- - nginx
35
- Strict-Transport-Security:
36
- - max-age=0; includeSubDomains
37
- - max-age=31536000; includeSubDomains
38
- X-Ratelimit-Limit:
39
- - '250000'
40
- X-Ratelimit-Remaining:
41
- - '249975'
42
- X-Ratelimit-Reset:
43
- - '1576789200'
44
- X-Request-Id:
45
- - 9348cf6f-365f-43fe-b460-f956c932097d
46
- X-Runtime:
47
- - '0.005338'
48
- Accept-Ranges:
49
- - bytes
50
- Date:
51
- - Thu, 19 Dec 2019 20:55:44 GMT
52
- Via:
53
- - 1.1 varnish
54
- X-Served-By:
55
- - cache-msp20820-MSP
56
- X-Cache:
57
- - MISS
58
- X-Cache-Hits:
59
- - '0'
60
- X-Timer:
61
- - S1576788945.699710,VS0,VE187
62
- Vary:
63
- - Origin,Accept-Encoding
64
- body:
65
- encoding: ASCII-8BIT
66
- string: '{"aliases_processed":1,"message":"success"}'
67
- http_version:
68
- recorded_at: Thu, 19 Dec 2019 20:55:44 GMT
69
- recorded_with: VCR 5.0.0
@@ -1,69 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: "<BRAZE_REST_URL>/users/identify"
6
- body:
7
- encoding: UTF-8
8
- string: '{"api_key":"<BRAZE_REST_API_KEY>","aliases_to_identify":[{"external_id":400,"user_alias":{"alias_name":"abc","alias_label":"foo"}}]}'
9
- headers:
10
- Content-Type:
11
- - application/json
12
- Accept:
13
- - application/json
14
- User-Agent:
15
- - Braze Ruby gem v0.3.2
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- response:
19
- status:
20
- code: 201
21
- message: Created
22
- headers:
23
- Connection:
24
- - keep-alive
25
- Content-Length:
26
- - '66'
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- Content-Type:
30
- - application/json
31
- Etag:
32
- - W/"da612bda0a786bcb949da037e296a092"
33
- Server:
34
- - nginx
35
- Strict-Transport-Security:
36
- - max-age=0; includeSubDomains
37
- - max-age=31536000; includeSubDomains
38
- X-Ratelimit-Limit:
39
- - '250000'
40
- X-Ratelimit-Remaining:
41
- - '249974'
42
- X-Ratelimit-Reset:
43
- - '1576789200'
44
- X-Request-Id:
45
- - 6df46e00-4a8a-4b57-8acf-849cbc53c569
46
- X-Runtime:
47
- - '0.005888'
48
- Accept-Ranges:
49
- - bytes
50
- Date:
51
- - Thu, 19 Dec 2019 20:55:45 GMT
52
- Via:
53
- - 1.1 varnish
54
- X-Served-By:
55
- - cache-msp20823-MSP
56
- X-Cache:
57
- - MISS
58
- X-Cache-Hits:
59
- - '0'
60
- X-Timer:
61
- - S1576788945.958885,VS0,VE226
62
- Vary:
63
- - Origin,Accept-Encoding
64
- body:
65
- encoding: ASCII-8BIT
66
- string: '{"aliases_processed":1,"message":"success"}'
67
- http_version:
68
- recorded_at: Thu, 19 Dec 2019 20:55:45 GMT
69
- recorded_with: VCR 5.0.0
@@ -1,81 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: "<BRAZE_REST_URL>/segments/list?api_key=<BRAZE_REST_API_KEY>"
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.14.0
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - "*/*"
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Cache-Control:
22
- - max-age=0, private, must-revalidate
23
- Content-Type:
24
- - application/json
25
- Etag:
26
- - W/"f82a7689f0f1df180510d033adeece51"
27
- Server:
28
- - nginx
29
- Strict-Transport-Security:
30
- - max-age=0; includeSubDomains
31
- - max-age=31536000; includeSubDomains
32
- X-Ratelimit-Limit:
33
- - '50000'
34
- X-Ratelimit-Remaining:
35
- - '49992'
36
- X-Ratelimit-Reset:
37
- - '1524002400'
38
- X-Request-Id:
39
- - a399cc89-0854-471e-aba3-71f3a79a4f47
40
- X-Runtime:
41
- - '0.017686'
42
- Content-Length:
43
- - '603'
44
- Accept-Ranges:
45
- - bytes
46
- Date:
47
- - Tue, 17 Apr 2018 21:08:20 GMT
48
- Via:
49
- - 1.1 varnish
50
- Age:
51
- - '0'
52
- Connection:
53
- - keep-alive
54
- X-Served-By:
55
- - cache-pdk17835-PDK
56
- X-Cache:
57
- - MISS
58
- X-Cache-Hits:
59
- - '0'
60
- X-Timer:
61
- - S1523999301.931262,VS0,VE59
62
- Vary:
63
- - Accept-Encoding
64
- body:
65
- encoding: ASCII-8BIT
66
- string: '{"segments":[{"id":"e094130b-8b90-4b01-a004-f2b25281564f","name":"Lapsed
67
- Users - 7 days","analytics_tracking_enabled":true,"tags":[]},{"id":"f77809b7-dda4-45ee-bcf4-46de5c58a0a2","name":"Lapsed
68
- Users - 30 days","analytics_tracking_enabled":true,"tags":[]},{"id":"61227661-f46e-4ab6-bbc9-e4d5f65f8dbc","name":"User
69
- Onboarding - First Week","analytics_tracking_enabled":true,"tags":[]},{"id":"0ccb0f97-b09c-4d0f-bc33-8c695c6eedf2","name":"User
70
- Onboarding - Second Week","analytics_tracking_enabled":true,"tags":[]},{"id":"f522dea9-d27c-48b9-8e98-c03b3346e4b4","name":"Engaged
71
- Recent Users","analytics_tracking_enabled":true,"tags":[]},{"id":"658307d8-3b8a-45fa-98ad-97fb75ee6eff","name":"All
72
- Users (Takl Staging - iOS)","analytics_tracking_enabled":true,"tags":[]},{"id":"d04aa317-a6f4-459d-b7c0-2b1cab68cb88","name":"All
73
- Users (Takl Staging - Android)","analytics_tracking_enabled":true,"tags":[]},{"id":"e2ff24e9-0d5d-4b50-8832-a4201b1d59a3","name":"All
74
- Users (Takl Staging Debug - Android)","analytics_tracking_enabled":true,"tags":[]},{"id":"3de3ddbf-a327-408b-aab4-6bd390a6409e","name":"All
75
- Users (Takl Staging - Web)","analytics_tracking_enabled":true,"tags":[]},{"id":"b109727d-4773-4cdf-b6c7-43385aa9ccb2","name":"Everybody","analytics_tracking_enabled":false,"tags":[]},{"id":"ef0a9a5e-c0be-41a0-9260-2718dfbe28d4","name":"Custom
76
- Event Segment","analytics_tracking_enabled":false,"tags":[]},{"id":"7a337f50-4e79-46f6-b8b2-2459027e9aca","name":"Morgans
77
- Segment","analytics_tracking_enabled":false,"tags":[]},{"id":"a8fde797-4c44-4406-8e6c-5850d323f169","name":"Justin''s
78
- Segment","analytics_tracking_enabled":false,"tags":[]}],"message":"success"}'
79
- http_version:
80
- recorded_at: Tue, 17 Apr 2018 21:08:20 GMT
81
- recorded_with: VCR 4.0.0
@@ -1,81 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: "<BRAZE_REST_URL>/segments/list?api_key=<BRAZE_REST_API_KEY>"
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.14.0
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - "*/*"
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Cache-Control:
22
- - max-age=0, private, must-revalidate
23
- Content-Type:
24
- - application/json
25
- Etag:
26
- - W/"f82a7689f0f1df180510d033adeece51"
27
- Server:
28
- - nginx
29
- Strict-Transport-Security:
30
- - max-age=0; includeSubDomains
31
- - max-age=31536000; includeSubDomains
32
- X-Ratelimit-Limit:
33
- - '50000'
34
- X-Ratelimit-Remaining:
35
- - '49993'
36
- X-Ratelimit-Reset:
37
- - '1524002400'
38
- X-Request-Id:
39
- - 79e46360-b955-47cf-87b2-8e3e1a6f5ced
40
- X-Runtime:
41
- - '0.020006'
42
- Content-Length:
43
- - '603'
44
- Accept-Ranges:
45
- - bytes
46
- Date:
47
- - Tue, 17 Apr 2018 21:08:20 GMT
48
- Via:
49
- - 1.1 varnish
50
- Age:
51
- - '0'
52
- Connection:
53
- - keep-alive
54
- X-Served-By:
55
- - cache-pdk17843-PDK
56
- X-Cache:
57
- - MISS
58
- X-Cache-Hits:
59
- - '0'
60
- X-Timer:
61
- - S1523999301.800558,VS0,VE61
62
- Vary:
63
- - Accept-Encoding
64
- body:
65
- encoding: ASCII-8BIT
66
- string: '{"segments":[{"id":"e094130b-8b90-4b01-a004-f2b25281564f","name":"Lapsed
67
- Users - 7 days","analytics_tracking_enabled":true,"tags":[]},{"id":"f77809b7-dda4-45ee-bcf4-46de5c58a0a2","name":"Lapsed
68
- Users - 30 days","analytics_tracking_enabled":true,"tags":[]},{"id":"61227661-f46e-4ab6-bbc9-e4d5f65f8dbc","name":"User
69
- Onboarding - First Week","analytics_tracking_enabled":true,"tags":[]},{"id":"0ccb0f97-b09c-4d0f-bc33-8c695c6eedf2","name":"User
70
- Onboarding - Second Week","analytics_tracking_enabled":true,"tags":[]},{"id":"f522dea9-d27c-48b9-8e98-c03b3346e4b4","name":"Engaged
71
- Recent Users","analytics_tracking_enabled":true,"tags":[]},{"id":"658307d8-3b8a-45fa-98ad-97fb75ee6eff","name":"All
72
- Users (Takl Staging - iOS)","analytics_tracking_enabled":true,"tags":[]},{"id":"d04aa317-a6f4-459d-b7c0-2b1cab68cb88","name":"All
73
- Users (Takl Staging - Android)","analytics_tracking_enabled":true,"tags":[]},{"id":"e2ff24e9-0d5d-4b50-8832-a4201b1d59a3","name":"All
74
- Users (Takl Staging Debug - Android)","analytics_tracking_enabled":true,"tags":[]},{"id":"3de3ddbf-a327-408b-aab4-6bd390a6409e","name":"All
75
- Users (Takl Staging - Web)","analytics_tracking_enabled":true,"tags":[]},{"id":"b109727d-4773-4cdf-b6c7-43385aa9ccb2","name":"Everybody","analytics_tracking_enabled":false,"tags":[]},{"id":"ef0a9a5e-c0be-41a0-9260-2718dfbe28d4","name":"Custom
76
- Event Segment","analytics_tracking_enabled":false,"tags":[]},{"id":"7a337f50-4e79-46f6-b8b2-2459027e9aca","name":"Morgans
77
- Segment","analytics_tracking_enabled":false,"tags":[]},{"id":"a8fde797-4c44-4406-8e6c-5850d323f169","name":"Justin''s
78
- Segment","analytics_tracking_enabled":false,"tags":[]}],"message":"success"}'
79
- http_version:
80
- recorded_at: Tue, 17 Apr 2018 21:08:20 GMT
81
- recorded_with: VCR 4.0.0
@@ -1,67 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: "<BRAZE_REST_URL>/messages/schedule/create"
6
- body:
7
- encoding: UTF-8
8
- string: '{"api_key":"non-existent","external_user_ids":[1],"schedule":{"time":"2019-02-15
9
- 00:00:00 -0500","in_local_time":false},"messages":{"apple_push":{"alert":"hello"}}}'
10
- headers:
11
- User-Agent:
12
- - Faraday v0.14.0
13
- Content-Type:
14
- - application/json
15
- Accept-Encoding:
16
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
- Accept:
18
- - "*/*"
19
- response:
20
- status:
21
- code: 401
22
- message: Unauthorized
23
- headers:
24
- Cache-Control:
25
- - no-cache
26
- Content-Type:
27
- - application/json
28
- Server:
29
- - nginx
30
- Strict-Transport-Security:
31
- - max-age=0; includeSubDomains
32
- X-Ratelimit-Limit:
33
- - ''
34
- X-Ratelimit-Remaining:
35
- - ''
36
- X-Ratelimit-Reset:
37
- - ''
38
- X-Request-Id:
39
- - 34c2cbbd-02bb-4104-9c06-47cb08bd061c
40
- X-Runtime:
41
- - '0.008932'
42
- Content-Length:
43
- - '85'
44
- Accept-Ranges:
45
- - bytes
46
- Date:
47
- - Tue, 17 Apr 2018 21:08:21 GMT
48
- Via:
49
- - 1.1 varnish
50
- Connection:
51
- - keep-alive
52
- X-Served-By:
53
- - cache-pdk17829-PDK
54
- X-Cache:
55
- - MISS
56
- X-Cache-Hits:
57
- - '0'
58
- X-Timer:
59
- - S1523999302.620925,VS0,VE191
60
- Vary:
61
- - Accept-Encoding
62
- body:
63
- encoding: ASCII-8BIT
64
- string: '{"message":"Invalid App Group API Identifier: non-existent"}'
65
- http_version:
66
- recorded_at: Tue, 17 Apr 2018 21:08:21 GMT
67
- recorded_with: VCR 4.0.0