vonage 7.20.0 → 8.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +87 -386
  3. data/lib/vonage/applications.rb +4 -12
  4. data/lib/vonage/client.rb +0 -42
  5. data/lib/vonage/client_error.rb +1 -1
  6. data/lib/vonage/config.rb +1 -9
  7. data/lib/vonage/errors.rb +20 -37
  8. data/lib/vonage/gsm7.rb +1 -1
  9. data/lib/vonage/jwt.rb +0 -17
  10. data/lib/vonage/keys.rb +0 -2
  11. data/lib/vonage/logger.rb +3 -5
  12. data/lib/vonage/messaging/channels/viber.rb +1 -8
  13. data/lib/vonage/messaging/channels/whats_app.rb +1 -3
  14. data/lib/vonage/messaging.rb +0 -11
  15. data/lib/vonage/namespace.rb +57 -128
  16. data/lib/vonage/numbers.rb +6 -29
  17. data/lib/vonage/server_error.rb +1 -1
  18. data/lib/vonage/signature.rb +5 -5
  19. data/lib/vonage/sms.rb +20 -20
  20. data/lib/vonage/version.rb +1 -1
  21. data/lib/vonage/video/archives.rb +53 -18
  22. data/lib/vonage/video/list_response.rb +11 -0
  23. data/lib/vonage/video/moderation.rb +22 -7
  24. data/lib/vonage/video/signals.rb +9 -4
  25. data/lib/vonage/video/streams.rb +12 -6
  26. data/lib/vonage/video.rb +13 -31
  27. data/lib/vonage/voice/actions/connect.rb +3 -27
  28. data/lib/vonage/voice/actions/conversation.rb +2 -2
  29. data/lib/vonage/voice/actions/pay.rb +107 -0
  30. data/lib/vonage/voice/actions/talk.rb +2 -11
  31. data/lib/vonage/voice/talk.rb +1 -11
  32. data/lib/vonage/voice.rb +0 -22
  33. data/lib/vonage.rb +0 -2
  34. data/vonage.gemspec +1 -2
  35. metadata +9 -65
  36. data/lib/vonage/api_error.rb +0 -33
  37. data/lib/vonage/meetings/applications.rb +0 -25
  38. data/lib/vonage/meetings/dial_in_numbers/list_response.rb +0 -11
  39. data/lib/vonage/meetings/dial_in_numbers.rb +0 -23
  40. data/lib/vonage/meetings/recordings.rb +0 -36
  41. data/lib/vonage/meetings/rooms/list_response.rb +0 -11
  42. data/lib/vonage/meetings/rooms.rb +0 -155
  43. data/lib/vonage/meetings/sessions/list_response.rb +0 -11
  44. data/lib/vonage/meetings/sessions.rb +0 -28
  45. data/lib/vonage/meetings/themes/list_response.rb +0 -11
  46. data/lib/vonage/meetings/themes.rb +0 -218
  47. data/lib/vonage/meetings.rb +0 -38
  48. data/lib/vonage/number_insight_2.rb +0 -36
  49. data/lib/vonage/proactive_connect/events/list_response.rb +0 -11
  50. data/lib/vonage/proactive_connect/events.rb +0 -68
  51. data/lib/vonage/proactive_connect/item.rb +0 -104
  52. data/lib/vonage/proactive_connect/items/file_response.rb +0 -32
  53. data/lib/vonage/proactive_connect/items/list_response.rb +0 -11
  54. data/lib/vonage/proactive_connect/items.rb +0 -107
  55. data/lib/vonage/proactive_connect/list.rb +0 -168
  56. data/lib/vonage/proactive_connect/lists/list_response.rb +0 -11
  57. data/lib/vonage/proactive_connect/lists.rb +0 -35
  58. data/lib/vonage/proactive_connect.rb +0 -33
  59. data/lib/vonage/subaccounts/balance_transfers/list_response.rb +0 -11
  60. data/lib/vonage/subaccounts/credit_transfers/list_response.rb +0 -11
  61. data/lib/vonage/subaccounts/list_response.rb +0 -15
  62. data/lib/vonage/subaccounts.rb +0 -203
  63. data/lib/vonage/users/list_response.rb +0 -11
  64. data/lib/vonage/users.rb +0 -156
  65. data/lib/vonage/verify2/channels/email.rb +0 -36
  66. data/lib/vonage/verify2/channels/silent_auth.rb +0 -45
  67. data/lib/vonage/verify2/channels/sms.rb +0 -53
  68. data/lib/vonage/verify2/channels/voice.rb +0 -32
  69. data/lib/vonage/verify2/channels/whats_app.rb +0 -38
  70. data/lib/vonage/verify2/channels/whats_app_interactive.rb +0 -32
  71. data/lib/vonage/verify2/start_verification_options.rb +0 -62
  72. data/lib/vonage/verify2/workflow.rb +0 -39
  73. data/lib/vonage/verify2/workflow_builder.rb +0 -25
  74. data/lib/vonage/verify2.rb +0 -93
  75. data/lib/vonage/video/archives/list_response.rb +0 -11
  76. data/lib/vonage/video/broadcasts/list_response.rb +0 -11
  77. data/lib/vonage/video/broadcasts.rb +0 -75
  78. data/lib/vonage/video/sip.rb +0 -48
  79. data/lib/vonage/video/streams/list_response.rb +0 -11
@@ -1,75 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Video::Broadcasts < Namespace
6
- include Keys
7
-
8
- self.authentication = BearerToken
9
-
10
- self.request_body = JSON
11
-
12
- self.host = :video_host
13
-
14
- # Get a list of live streaming broadcasts for a specified Vonage application.
15
- #
16
- def list(**params)
17
- path = '/v2/project/' + @config.application_id + '/broadcast'
18
- path += "?#{Params.encode(camelcase(params))}" unless params.empty?
19
-
20
- request(path, response_class: ListResponse)
21
- end
22
-
23
- # Return information for specified broadcast.
24
- #
25
- def info(broadcast_id:)
26
- request('/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id)
27
- end
28
-
29
- # Start a new live streaming broadcast.
30
- #
31
- def start(session_id:, **params)
32
- request(
33
- '/v2/project/' + @config.application_id + '/broadcast',
34
- params: camelcase(params.merge(session_id: session_id)),
35
- type: Post
36
- )
37
- end
38
-
39
- # Stop a specified broadcast.
40
- #
41
- def stop(broadcast_id:)
42
- request('/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id + '/stop', type: Post)
43
- end
44
-
45
- # Add a stream to a live streaming broadcast.
46
- #
47
-
48
- def add_stream(broadcast_id:, stream_id:, **params)
49
- request(
50
- '/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id + '/streams',
51
- params: camelcase(params.merge(addStream: stream_id)),
52
- type: Patch
53
- )
54
- end
55
-
56
- # Remove a stream from a live streaming broadcast.
57
- #
58
- def remove_stream(broadcast_id:, stream_id:)
59
- request(
60
- '/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id + '/streams',
61
- params: {removeStream: stream_id},
62
- type: Patch
63
- )
64
- end
65
-
66
- # Dynamically change layout of a broadcast.
67
- #
68
- def change_layout(broadcast_id:, **params)
69
- request(
70
- '/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id + '/layout',
71
- params: camelcase(params),
72
- type: Put)
73
- end
74
- end
75
- end
@@ -1,48 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Video::SIP < Namespace
6
- include Keys
7
-
8
- self.authentication = BearerToken
9
-
10
- self.request_body = JSON
11
-
12
- self.host = :video_host
13
-
14
- # Initiate an outbound SIP call.
15
- #
16
- def dial(session_id:, token:, sip_uri:, **params)
17
- request(
18
- '/v2/project/' + @config.application_id + '/dial',
19
- params: camelcase({
20
- session_id: session_id,
21
- token: token,
22
- sip: params.merge({uri: sip_uri})
23
- }),
24
- type: Post
25
- )
26
- end
27
-
28
- # Play DTMF tones into a SIP call.
29
- #
30
- def play_dtmf_to_session(session_id:, dtmf_digits:)
31
- request(
32
- '/v2/project/' + @config.application_id + '/session/' + session_id + '/play-dtmf',
33
- params: {digits: dtmf_digits},
34
- type: Post
35
- )
36
- end
37
-
38
- # Play DMTF tones into a specific connection.
39
- #
40
- def play_dtmf_to_connection(session_id:, connection_id:, dtmf_digits:)
41
- request(
42
- '/v2/project/' + @config.application_id + '/session/' + session_id + '/connection/' + connection_id + '/play-dtmf',
43
- params: {digits: dtmf_digits},
44
- type: Post
45
- )
46
- end
47
- end
48
- end
@@ -1,11 +0,0 @@
1
- # typed: true
2
-
3
- class Vonage::Video::Streams::ListResponse < Vonage::Response
4
- include Enumerable
5
-
6
- def each
7
- return enum_for(:each) unless block_given?
8
-
9
- @entity.items.each { |item| yield item }
10
- end
11
- end