daily-ruby 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +119 -0
  5. data/Rakefile +10 -0
  6. data/daily-ruby.gemspec +40 -0
  7. data/daily.yaml +422 -0
  8. data/docs/CreateMeetingToken200Response.md +18 -0
  9. data/docs/MeetingTokenRequest.md +18 -0
  10. data/docs/MeetingTokenRequestProperties.md +56 -0
  11. data/docs/MeetingTokenRequestPropertiesPermissions.md +22 -0
  12. data/docs/MeetingTokenRequestPropertiesPermissionsCanAdmin.md +49 -0
  13. data/docs/MeetingTokenRequestPropertiesPermissionsCanSend.md +49 -0
  14. data/docs/MeetingTokensApi.md +79 -0
  15. data/docs/RoomApi.md +227 -0
  16. data/docs/RoomDeletedResponse.md +20 -0
  17. data/docs/RoomNotFoundResponse.md +20 -0
  18. data/docs/RoomRequest.md +22 -0
  19. data/docs/RoomRequestProperties.md +76 -0
  20. data/docs/RoomResponse.md +28 -0
  21. data/docs/ServerErrorResponse.md +18 -0
  22. data/git_push.sh +57 -0
  23. data/lib/daily-ruby/api/meeting_tokens_api.rb +86 -0
  24. data/lib/daily-ruby/api/room_api.rb +218 -0
  25. data/lib/daily-ruby/api_client.rb +431 -0
  26. data/lib/daily-ruby/api_error.rb +58 -0
  27. data/lib/daily-ruby/configuration.rb +382 -0
  28. data/lib/daily-ruby/models/create_meeting_token200_response.rb +214 -0
  29. data/lib/daily-ruby/models/meeting_token_request.rb +215 -0
  30. data/lib/daily-ruby/models/meeting_token_request_properties.rb +438 -0
  31. data/lib/daily-ruby/models/meeting_token_request_properties_permissions.rb +232 -0
  32. data/lib/daily-ruby/models/meeting_token_request_properties_permissions_can_admin.rb +105 -0
  33. data/lib/daily-ruby/models/meeting_token_request_properties_permissions_can_send.rb +105 -0
  34. data/lib/daily-ruby/models/room_deleted_response.rb +224 -0
  35. data/lib/daily-ruby/models/room_not_found_response.rb +224 -0
  36. data/lib/daily-ruby/models/room_request.rb +267 -0
  37. data/lib/daily-ruby/models/room_request_properties.rb +521 -0
  38. data/lib/daily-ruby/models/room_response.rb +260 -0
  39. data/lib/daily-ruby/models/server_error_response.rb +215 -0
  40. data/lib/daily-ruby/version.rb +15 -0
  41. data/lib/daily-ruby.rb +53 -0
  42. data/run.sh +16 -0
  43. data/script.rb +35 -0
  44. data/spec/api/meeting_tokens_api_spec.rb +47 -0
  45. data/spec/api/room_api_spec.rb +74 -0
  46. data/spec/models/create_meeting_token200_response_spec.rb +36 -0
  47. data/spec/models/meeting_token_request_properties_permissions_can_admin_spec.rb +32 -0
  48. data/spec/models/meeting_token_request_properties_permissions_can_send_spec.rb +32 -0
  49. data/spec/models/meeting_token_request_properties_permissions_spec.rb +48 -0
  50. data/spec/models/meeting_token_request_properties_spec.rb +158 -0
  51. data/spec/models/meeting_token_request_spec.rb +36 -0
  52. data/spec/models/room_deleted_response_spec.rb +42 -0
  53. data/spec/models/room_not_found_response_spec.rb +42 -0
  54. data/spec/models/room_request_properties_spec.rb +218 -0
  55. data/spec/models/room_request_spec.rb +52 -0
  56. data/spec/models/room_response_spec.rb +66 -0
  57. data/spec/models/server_error_response_spec.rb +36 -0
  58. data/spec/spec_helper.rb +111 -0
  59. metadata +169 -0
data/git_push.sh ADDED
@@ -0,0 +1,57 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
@@ -0,0 +1,86 @@
1
+ =begin
2
+ #Daily
3
+
4
+ #The official library for communicating with the Daily REST API.
5
+
6
+ The version of the OpenAPI document: 0.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.3.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Daily
16
+ class MeetingTokensApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Creates a meeting token
23
+ # A POST request to /meeting-tokens creates a new meeting token.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [MeetingTokenRequest] :meeting_token_request A room object
26
+ # @return [CreateMeetingToken200Response]
27
+ def create_meeting_token(opts = {})
28
+ data, _status_code, _headers = create_meeting_token_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # Creates a meeting token
33
+ # A POST request to /meeting-tokens creates a new meeting token.
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [MeetingTokenRequest] :meeting_token_request A room object
36
+ # @return [Array<(CreateMeetingToken200Response, Integer, Hash)>] CreateMeetingToken200Response data, response status code and response headers
37
+ def create_meeting_token_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: MeetingTokensApi.create_meeting_token ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/meeting-tokens'
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+
47
+ # header parameters
48
+ header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
+ # HTTP header 'Content-Type'
52
+ content_type = @api_client.select_header_content_type(['application/json'])
53
+ if !content_type.nil?
54
+ header_params['Content-Type'] = content_type
55
+ end
56
+
57
+ # form parameters
58
+ form_params = opts[:form_params] || {}
59
+
60
+ # http body (model)
61
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'meeting_token_request'])
62
+
63
+ # return_type
64
+ return_type = opts[:debug_return_type] || 'CreateMeetingToken200Response'
65
+
66
+ # auth_names
67
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
68
+
69
+ new_options = opts.merge(
70
+ :operation => :"MeetingTokensApi.create_meeting_token",
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: MeetingTokensApi#create_meeting_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #Daily
3
+
4
+ #The official library for communicating with the Daily REST API.
5
+
6
+ The version of the OpenAPI document: 0.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.3.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Daily
16
+ class RoomApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a new room
23
+ # A POST request to /rooms creates a new room.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [RoomRequest] :room_request A room object
26
+ # @return [RoomResponse]
27
+ def create_room(opts = {})
28
+ data, _status_code, _headers = create_room_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # Create a new room
33
+ # A POST request to /rooms creates a new room.
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [RoomRequest] :room_request A room object
36
+ # @return [Array<(RoomResponse, Integer, Hash)>] RoomResponse data, response status code and response headers
37
+ def create_room_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RoomApi.create_room ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/rooms'
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+
47
+ # header parameters
48
+ header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
+ # HTTP header 'Content-Type'
52
+ content_type = @api_client.select_header_content_type(['application/json'])
53
+ if !content_type.nil?
54
+ header_params['Content-Type'] = content_type
55
+ end
56
+
57
+ # form parameters
58
+ form_params = opts[:form_params] || {}
59
+
60
+ # http body (model)
61
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'room_request'])
62
+
63
+ # return_type
64
+ return_type = opts[:debug_return_type] || 'RoomResponse'
65
+
66
+ # auth_names
67
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
68
+
69
+ new_options = opts.merge(
70
+ :operation => :"RoomApi.create_room",
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: RoomApi#create_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete room
87
+ # Delete a Daily room.
88
+ # @param name [String] The room name that needs to be deleted
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [RoomDeletedResponse]
91
+ def delete_room(name, opts = {})
92
+ data, _status_code, _headers = delete_room_with_http_info(name, opts)
93
+ data
94
+ end
95
+
96
+ # Delete room
97
+ # Delete a Daily room.
98
+ # @param name [String] The room name that needs to be deleted
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(RoomDeletedResponse, Integer, Hash)>] RoomDeletedResponse data, response status code and response headers
101
+ def delete_room_with_http_info(name, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RoomApi.delete_room ...'
104
+ end
105
+ # verify the required parameter 'name' is set
106
+ if @api_client.config.client_side_validation && name.nil?
107
+ fail ArgumentError, "Missing the required parameter 'name' when calling RoomApi.delete_room"
108
+ end
109
+ # resource path
110
+ local_var_path = '/rooms/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:debug_body]
125
+
126
+ # return_type
127
+ return_type = opts[:debug_return_type] || 'RoomDeletedResponse'
128
+
129
+ # auth_names
130
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
131
+
132
+ new_options = opts.merge(
133
+ :operation => :"RoomApi.delete_room",
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => return_type
140
+ )
141
+
142
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: RoomApi#delete_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ # Get a list rooms
150
+ # A GET request to /rooms returns a list of rooms.
151
+ # @param [Hash] opts the optional parameters
152
+ # @option opts [Integer] :offset The number of items to skip before starting to collect the result set.
153
+ # @option opts [Integer] :limit The numbers of items to return.
154
+ # @option opts [String] :ending_before A cursor for use in pagination. ending_before is an object ID that defines your place in the list.
155
+ # @option opts [String] :starting_after A cursor for use in pagination. starting_after is an object ID that defines your place in the list.
156
+ # @return [Array<RoomResponse>]
157
+ def get_rooms(opts = {})
158
+ data, _status_code, _headers = get_rooms_with_http_info(opts)
159
+ data
160
+ end
161
+
162
+ # Get a list rooms
163
+ # A GET request to /rooms returns a list of rooms.
164
+ # @param [Hash] opts the optional parameters
165
+ # @option opts [Integer] :offset The number of items to skip before starting to collect the result set.
166
+ # @option opts [Integer] :limit The numbers of items to return.
167
+ # @option opts [String] :ending_before A cursor for use in pagination. ending_before is an object ID that defines your place in the list.
168
+ # @option opts [String] :starting_after A cursor for use in pagination. starting_after is an object ID that defines your place in the list.
169
+ # @return [Array<(Array<RoomResponse>, Integer, Hash)>] Array<RoomResponse> data, response status code and response headers
170
+ def get_rooms_with_http_info(opts = {})
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug 'Calling API: RoomApi.get_rooms ...'
173
+ end
174
+ # resource path
175
+ local_var_path = '/rooms'
176
+
177
+ # query parameters
178
+ query_params = opts[:query_params] || {}
179
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
180
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
181
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
182
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
183
+
184
+ # header parameters
185
+ header_params = opts[:header_params] || {}
186
+ # HTTP header 'Accept' (if needed)
187
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
188
+
189
+ # form parameters
190
+ form_params = opts[:form_params] || {}
191
+
192
+ # http body (model)
193
+ post_body = opts[:debug_body]
194
+
195
+ # return_type
196
+ return_type = opts[:debug_return_type] || 'Array<RoomResponse>'
197
+
198
+ # auth_names
199
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
200
+
201
+ new_options = opts.merge(
202
+ :operation => :"RoomApi.get_rooms",
203
+ :header_params => header_params,
204
+ :query_params => query_params,
205
+ :form_params => form_params,
206
+ :body => post_body,
207
+ :auth_names => auth_names,
208
+ :return_type => return_type
209
+ )
210
+
211
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
212
+ if @api_client.config.debugging
213
+ @api_client.config.logger.debug "API called: RoomApi#get_rooms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
214
+ end
215
+ return data, status_code, headers
216
+ end
217
+ end
218
+ end