commonlit-clever-ruby 2.1.4 → 2.1.6.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +27 -30
  3. data/Makefile +1 -1
  4. data/README.md +60 -61
  5. data/clever-ruby.gemspec +6 -6
  6. data/docs/Contact.md +1 -1
  7. data/docs/ContactsApi.md +231 -0
  8. data/docs/ContactsCreated.md +2 -2
  9. data/docs/ContactsDeleted.md +2 -2
  10. data/docs/ContactsUpdated.md +2 -2
  11. data/docs/Course.md +1 -1
  12. data/docs/CoursesApi.md +231 -0
  13. data/docs/CoursesCreated.md +2 -2
  14. data/docs/CoursesDeleted.md +2 -2
  15. data/docs/CoursesUpdated.md +2 -2
  16. data/docs/District.md +9 -9
  17. data/docs/DistrictAdmin.md +2 -2
  18. data/docs/DistrictAdminsApi.md +171 -0
  19. data/docs/DistrictadminsCreated.md +2 -2
  20. data/docs/DistrictadminsDeleted.md +2 -2
  21. data/docs/DistrictadminsUpdated.md +2 -2
  22. data/docs/DistrictsApi.md +113 -0
  23. data/docs/DistrictsCreated.md +2 -2
  24. data/docs/DistrictsDeleted.md +2 -2
  25. data/docs/DistrictsUpdated.md +2 -2
  26. data/docs/Event.md +2 -2
  27. data/docs/EventsApi.md +1 -1
  28. data/docs/Location.md +2 -2
  29. data/docs/Name.md +1 -1
  30. data/docs/Principal.md +1 -1
  31. data/docs/School.md +3 -3
  32. data/docs/SchoolAdmin.md +3 -3
  33. data/docs/SchoolAdminsApi.md +231 -0
  34. data/docs/SchoolEnrollment.md +1 -1
  35. data/docs/SchooladminsCreated.md +2 -2
  36. data/docs/SchooladminsDeleted.md +2 -2
  37. data/docs/SchooladminsUpdated.md +2 -2
  38. data/docs/SchoolsApi.md +351 -0
  39. data/docs/SchoolsCreated.md +2 -2
  40. data/docs/SchoolsDeleted.md +2 -2
  41. data/docs/SchoolsUpdated.md +2 -2
  42. data/docs/Section.md +2 -2
  43. data/docs/SectionsApi.md +499 -0
  44. data/docs/SectionsCreated.md +2 -2
  45. data/docs/SectionsDeleted.md +2 -2
  46. data/docs/SectionsUpdated.md +2 -2
  47. data/docs/Student.md +3 -3
  48. data/docs/StudentsApi.md +463 -0
  49. data/docs/StudentsCreated.md +2 -2
  50. data/docs/StudentsDeleted.md +2 -2
  51. data/docs/StudentsUpdated.md +2 -2
  52. data/docs/Teacher.md +2 -2
  53. data/docs/TeachersApi.md +403 -0
  54. data/docs/TeachersCreated.md +2 -2
  55. data/docs/TeachersDeleted.md +2 -2
  56. data/docs/TeachersUpdated.md +2 -2
  57. data/docs/Term.md +2 -2
  58. data/docs/TermsApi.md +231 -0
  59. data/docs/TermsCreated.md +2 -2
  60. data/docs/TermsDeleted.md +2 -2
  61. data/docs/TermsUpdated.md +2 -2
  62. data/full-v2.yml +2541 -0
  63. data/lib/clever-ruby/api/contacts_api.rb +241 -0
  64. data/lib/clever-ruby/api/courses_api.rb +241 -0
  65. data/lib/clever-ruby/api/district_admins_api.rb +182 -0
  66. data/lib/clever-ruby/api/districts_api.rb +123 -0
  67. data/lib/clever-ruby/api/events_api.rb +3 -3
  68. data/lib/clever-ruby/api/school_admins_api.rb +241 -0
  69. data/lib/clever-ruby/api/schools_api.rb +359 -0
  70. data/lib/clever-ruby/api/sections_api.rb +500 -0
  71. data/lib/clever-ruby/api/students_api.rb +468 -0
  72. data/lib/clever-ruby/api/teachers_api.rb +409 -0
  73. data/lib/clever-ruby/api/terms_api.rb +241 -0
  74. data/lib/clever-ruby/api_client.rb +1 -0
  75. data/lib/clever-ruby/api_error.rb +3 -3
  76. data/lib/clever-ruby/configuration.rb +4 -4
  77. data/lib/clever-ruby/models/admin_name.rb +3 -3
  78. data/lib/clever-ruby/models/bad_request.rb +3 -3
  79. data/lib/clever-ruby/models/contact.rb +13 -13
  80. data/lib/clever-ruby/models/contact_object.rb +3 -3
  81. data/lib/clever-ruby/models/contact_response.rb +3 -3
  82. data/lib/clever-ruby/models/contacts_response.rb +3 -3
  83. data/lib/clever-ruby/models/course.rb +16 -16
  84. data/lib/clever-ruby/models/course_object.rb +3 -3
  85. data/lib/clever-ruby/models/course_response.rb +3 -3
  86. data/lib/clever-ruby/models/courses_response.rb +3 -3
  87. data/lib/clever-ruby/models/credentials.rb +3 -3
  88. data/lib/clever-ruby/models/district.rb +69 -69
  89. data/lib/clever-ruby/models/district_admin.rb +25 -25
  90. data/lib/clever-ruby/models/district_admin_object.rb +3 -3
  91. data/lib/clever-ruby/models/district_admin_response.rb +3 -3
  92. data/lib/clever-ruby/models/district_admins_response.rb +3 -3
  93. data/lib/clever-ruby/models/district_object.rb +3 -3
  94. data/lib/clever-ruby/models/district_response.rb +3 -3
  95. data/lib/clever-ruby/models/districts_response.rb +3 -3
  96. data/lib/clever-ruby/models/event.rb +16 -16
  97. data/lib/clever-ruby/models/event_response.rb +3 -3
  98. data/lib/clever-ruby/models/events_response.rb +3 -3
  99. data/lib/clever-ruby/models/internal_error.rb +3 -3
  100. data/lib/clever-ruby/models/link.rb +3 -3
  101. data/lib/clever-ruby/models/location.rb +25 -25
  102. data/lib/clever-ruby/models/name.rb +16 -16
  103. data/lib/clever-ruby/models/not_found.rb +3 -3
  104. data/lib/clever-ruby/models/principal.rb +16 -16
  105. data/lib/clever-ruby/models/school.rb +34 -34
  106. data/lib/clever-ruby/models/school_admin.rb +34 -34
  107. data/lib/clever-ruby/models/school_admin_object.rb +3 -3
  108. data/lib/clever-ruby/models/school_admin_response.rb +3 -3
  109. data/lib/clever-ruby/models/school_admins_response.rb +3 -3
  110. data/lib/clever-ruby/models/school_enrollment.rb +16 -16
  111. data/lib/clever-ruby/models/school_object.rb +3 -3
  112. data/lib/clever-ruby/models/school_response.rb +3 -3
  113. data/lib/clever-ruby/models/schools_response.rb +3 -3
  114. data/lib/clever-ruby/models/section.rb +25 -25
  115. data/lib/clever-ruby/models/section_object.rb +3 -3
  116. data/lib/clever-ruby/models/section_response.rb +3 -3
  117. data/lib/clever-ruby/models/sections_response.rb +3 -3
  118. data/lib/clever-ruby/models/student.rb +34 -34
  119. data/lib/clever-ruby/models/student_object.rb +3 -3
  120. data/lib/clever-ruby/models/student_response.rb +3 -3
  121. data/lib/clever-ruby/models/students_response.rb +3 -3
  122. data/lib/clever-ruby/models/teacher.rb +25 -25
  123. data/lib/clever-ruby/models/teacher_object.rb +3 -3
  124. data/lib/clever-ruby/models/teacher_response.rb +3 -3
  125. data/lib/clever-ruby/models/teachers_response.rb +3 -3
  126. data/lib/clever-ruby/models/term.rb +25 -25
  127. data/lib/clever-ruby/models/term_object.rb +3 -3
  128. data/lib/clever-ruby/models/term_response.rb +3 -3
  129. data/lib/clever-ruby/models/terms_response.rb +3 -3
  130. data/lib/clever-ruby/version.rb +4 -4
  131. data/lib/clever-ruby.rb +13 -4
  132. data/override/README-extension.md +4 -5
  133. data/override/api_client.rb +1 -0
  134. data/override/override.sh +4 -5
  135. data/spec/api/contacts_api_spec.rb +84 -0
  136. data/spec/api/courses_api_spec.rb +84 -0
  137. data/spec/api/district_admins_api_spec.rb +70 -0
  138. data/spec/api/districts_api_spec.rb +56 -0
  139. data/spec/api/events_api_spec.rb +60 -0
  140. data/spec/api/school_admins_api_spec.rb +84 -0
  141. data/spec/api/schools_api_spec.rb +112 -0
  142. data/spec/api/sections_api_spec.rb +142 -0
  143. data/spec/api/students_api_spec.rb +137 -0
  144. data/spec/api/teachers_api_spec.rb +123 -0
  145. data/spec/api/terms_api_spec.rb +84 -0
  146. data/spec/api_client_spec.rb +225 -0
  147. data/spec/spec_helper.rb +25 -18
  148. metadata +71 -33
  149. data/commonlit-clever-ruby-2.1.3.gem +0 -0
  150. data/docs/DataApi.md +0 -2852
  151. data/git_push.sh +0 -55
  152. data/lib/clever-ruby/api/data_api.rb +0 -2798
  153. data/spec/events.json +0 -227
  154. data/tags +0 -1681
@@ -0,0 +1,468 @@
1
+ =begin
2
+ #Data API
3
+
4
+ #Serves the Clever Data API
5
+
6
+ OpenAPI spec version: 2.1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.37
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module Clever
16
+ class StudentsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Returns the contacts for a student
23
+ # @param id
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Integer] :limit
26
+ # @option opts [String] :starting_after
27
+ # @option opts [String] :ending_before
28
+ # @return [ContactsResponse]
29
+ def get_contacts_for_student(id, opts = {})
30
+ data, _status_code, _headers = get_contacts_for_student_with_http_info(id, opts)
31
+ data
32
+ end
33
+
34
+ # Returns the contacts for a student
35
+ # @param id
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [Integer] :limit
38
+ # @option opts [String] :starting_after
39
+ # @option opts [String] :ending_before
40
+ # @return [Array<(ContactsResponse, Fixnum, Hash)>] ContactsResponse data, response status code and response headers
41
+ def get_contacts_for_student_with_http_info(id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: StudentsApi.get_contacts_for_student ...'
44
+ end
45
+ # verify the required parameter 'id' is set
46
+ if @api_client.config.client_side_validation && id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'id' when calling StudentsApi.get_contacts_for_student"
48
+ end
49
+ # resource path
50
+ local_var_path = '/students/{id}/contacts'.sub('{' + 'id' + '}', id.to_s)
51
+
52
+ # query parameters
53
+ query_params = {}
54
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
55
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
56
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
57
+
58
+ # header parameters
59
+ header_params = {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
62
+
63
+ # form parameters
64
+ form_params = {}
65
+
66
+ # http body (model)
67
+ post_body = nil
68
+ auth_names = ['oauth']
69
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => 'ContactsResponse')
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: StudentsApi#get_contacts_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+ # Returns the district for a student
82
+ # @param id
83
+ # @param [Hash] opts the optional parameters
84
+ # @return [DistrictResponse]
85
+ def get_district_for_student(id, opts = {})
86
+ data, _status_code, _headers = get_district_for_student_with_http_info(id, opts)
87
+ data
88
+ end
89
+
90
+ # Returns the district for a student
91
+ # @param id
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<(DistrictResponse, Fixnum, Hash)>] DistrictResponse data, response status code and response headers
94
+ def get_district_for_student_with_http_info(id, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: StudentsApi.get_district_for_student ...'
97
+ end
98
+ # verify the required parameter 'id' is set
99
+ if @api_client.config.client_side_validation && id.nil?
100
+ fail ArgumentError, "Missing the required parameter 'id' when calling StudentsApi.get_district_for_student"
101
+ end
102
+ # resource path
103
+ local_var_path = '/students/{id}/district'.sub('{' + 'id' + '}', id.to_s)
104
+
105
+ # query parameters
106
+ query_params = {}
107
+
108
+ # header parameters
109
+ header_params = {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
112
+
113
+ # form parameters
114
+ form_params = {}
115
+
116
+ # http body (model)
117
+ post_body = nil
118
+ auth_names = ['oauth']
119
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
120
+ :header_params => header_params,
121
+ :query_params => query_params,
122
+ :form_params => form_params,
123
+ :body => post_body,
124
+ :auth_names => auth_names,
125
+ :return_type => 'DistrictResponse')
126
+ if @api_client.config.debugging
127
+ @api_client.config.logger.debug "API called: StudentsApi#get_district_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
128
+ end
129
+ return data, status_code, headers
130
+ end
131
+ # Returns the primary school for a student
132
+ # @param id
133
+ # @param [Hash] opts the optional parameters
134
+ # @return [SchoolResponse]
135
+ def get_school_for_student(id, opts = {})
136
+ data, _status_code, _headers = get_school_for_student_with_http_info(id, opts)
137
+ data
138
+ end
139
+
140
+ # Returns the primary school for a student
141
+ # @param id
142
+ # @param [Hash] opts the optional parameters
143
+ # @return [Array<(SchoolResponse, Fixnum, Hash)>] SchoolResponse data, response status code and response headers
144
+ def get_school_for_student_with_http_info(id, opts = {})
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug 'Calling API: StudentsApi.get_school_for_student ...'
147
+ end
148
+ # verify the required parameter 'id' is set
149
+ if @api_client.config.client_side_validation && id.nil?
150
+ fail ArgumentError, "Missing the required parameter 'id' when calling StudentsApi.get_school_for_student"
151
+ end
152
+ # resource path
153
+ local_var_path = '/students/{id}/school'.sub('{' + 'id' + '}', id.to_s)
154
+
155
+ # query parameters
156
+ query_params = {}
157
+
158
+ # header parameters
159
+ header_params = {}
160
+ # HTTP header 'Accept' (if needed)
161
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
162
+
163
+ # form parameters
164
+ form_params = {}
165
+
166
+ # http body (model)
167
+ post_body = nil
168
+ auth_names = ['oauth']
169
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
170
+ :header_params => header_params,
171
+ :query_params => query_params,
172
+ :form_params => form_params,
173
+ :body => post_body,
174
+ :auth_names => auth_names,
175
+ :return_type => 'SchoolResponse')
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug "API called: StudentsApi#get_school_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
+ end
179
+ return data, status_code, headers
180
+ end
181
+ # Returns the schools for a student
182
+ # @param id
183
+ # @param [Hash] opts the optional parameters
184
+ # @option opts [Integer] :limit
185
+ # @option opts [String] :starting_after
186
+ # @option opts [String] :ending_before
187
+ # @return [SchoolsResponse]
188
+ def get_schools_for_student(id, opts = {})
189
+ data, _status_code, _headers = get_schools_for_student_with_http_info(id, opts)
190
+ data
191
+ end
192
+
193
+ # Returns the schools for a student
194
+ # @param id
195
+ # @param [Hash] opts the optional parameters
196
+ # @option opts [Integer] :limit
197
+ # @option opts [String] :starting_after
198
+ # @option opts [String] :ending_before
199
+ # @return [Array<(SchoolsResponse, Fixnum, Hash)>] SchoolsResponse data, response status code and response headers
200
+ def get_schools_for_student_with_http_info(id, opts = {})
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug 'Calling API: StudentsApi.get_schools_for_student ...'
203
+ end
204
+ # verify the required parameter 'id' is set
205
+ if @api_client.config.client_side_validation && id.nil?
206
+ fail ArgumentError, "Missing the required parameter 'id' when calling StudentsApi.get_schools_for_student"
207
+ end
208
+ # resource path
209
+ local_var_path = '/students/{id}/schools'.sub('{' + 'id' + '}', id.to_s)
210
+
211
+ # query parameters
212
+ query_params = {}
213
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
214
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
215
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
216
+
217
+ # header parameters
218
+ header_params = {}
219
+ # HTTP header 'Accept' (if needed)
220
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
221
+
222
+ # form parameters
223
+ form_params = {}
224
+
225
+ # http body (model)
226
+ post_body = nil
227
+ auth_names = ['oauth']
228
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
229
+ :header_params => header_params,
230
+ :query_params => query_params,
231
+ :form_params => form_params,
232
+ :body => post_body,
233
+ :auth_names => auth_names,
234
+ :return_type => 'SchoolsResponse')
235
+ if @api_client.config.debugging
236
+ @api_client.config.logger.debug "API called: StudentsApi#get_schools_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
237
+ end
238
+ return data, status_code, headers
239
+ end
240
+ # Returns the sections for a student
241
+ # @param id
242
+ # @param [Hash] opts the optional parameters
243
+ # @option opts [Integer] :limit
244
+ # @option opts [String] :starting_after
245
+ # @option opts [String] :ending_before
246
+ # @return [SectionsResponse]
247
+ def get_sections_for_student(id, opts = {})
248
+ data, _status_code, _headers = get_sections_for_student_with_http_info(id, opts)
249
+ data
250
+ end
251
+
252
+ # Returns the sections for a student
253
+ # @param id
254
+ # @param [Hash] opts the optional parameters
255
+ # @option opts [Integer] :limit
256
+ # @option opts [String] :starting_after
257
+ # @option opts [String] :ending_before
258
+ # @return [Array<(SectionsResponse, Fixnum, Hash)>] SectionsResponse data, response status code and response headers
259
+ def get_sections_for_student_with_http_info(id, opts = {})
260
+ if @api_client.config.debugging
261
+ @api_client.config.logger.debug 'Calling API: StudentsApi.get_sections_for_student ...'
262
+ end
263
+ # verify the required parameter 'id' is set
264
+ if @api_client.config.client_side_validation && id.nil?
265
+ fail ArgumentError, "Missing the required parameter 'id' when calling StudentsApi.get_sections_for_student"
266
+ end
267
+ # resource path
268
+ local_var_path = '/students/{id}/sections'.sub('{' + 'id' + '}', id.to_s)
269
+
270
+ # query parameters
271
+ query_params = {}
272
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
273
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
274
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
275
+
276
+ # header parameters
277
+ header_params = {}
278
+ # HTTP header 'Accept' (if needed)
279
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
280
+
281
+ # form parameters
282
+ form_params = {}
283
+
284
+ # http body (model)
285
+ post_body = nil
286
+ auth_names = ['oauth']
287
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
288
+ :header_params => header_params,
289
+ :query_params => query_params,
290
+ :form_params => form_params,
291
+ :body => post_body,
292
+ :auth_names => auth_names,
293
+ :return_type => 'SectionsResponse')
294
+ if @api_client.config.debugging
295
+ @api_client.config.logger.debug "API called: StudentsApi#get_sections_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
296
+ end
297
+ return data, status_code, headers
298
+ end
299
+ # Returns a specific student
300
+ # @param id
301
+ # @param [Hash] opts the optional parameters
302
+ # @return [StudentResponse]
303
+ def get_student(id, opts = {})
304
+ data, _status_code, _headers = get_student_with_http_info(id, opts)
305
+ data
306
+ end
307
+
308
+ # Returns a specific student
309
+ # @param id
310
+ # @param [Hash] opts the optional parameters
311
+ # @return [Array<(StudentResponse, Fixnum, Hash)>] StudentResponse data, response status code and response headers
312
+ def get_student_with_http_info(id, opts = {})
313
+ if @api_client.config.debugging
314
+ @api_client.config.logger.debug 'Calling API: StudentsApi.get_student ...'
315
+ end
316
+ # verify the required parameter 'id' is set
317
+ if @api_client.config.client_side_validation && id.nil?
318
+ fail ArgumentError, "Missing the required parameter 'id' when calling StudentsApi.get_student"
319
+ end
320
+ # resource path
321
+ local_var_path = '/students/{id}'.sub('{' + 'id' + '}', id.to_s)
322
+
323
+ # query parameters
324
+ query_params = {}
325
+
326
+ # header parameters
327
+ header_params = {}
328
+ # HTTP header 'Accept' (if needed)
329
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
330
+
331
+ # form parameters
332
+ form_params = {}
333
+
334
+ # http body (model)
335
+ post_body = nil
336
+ auth_names = ['oauth']
337
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
338
+ :header_params => header_params,
339
+ :query_params => query_params,
340
+ :form_params => form_params,
341
+ :body => post_body,
342
+ :auth_names => auth_names,
343
+ :return_type => 'StudentResponse')
344
+ if @api_client.config.debugging
345
+ @api_client.config.logger.debug "API called: StudentsApi#get_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
346
+ end
347
+ return data, status_code, headers
348
+ end
349
+ # Returns a list of students
350
+ # @param [Hash] opts the optional parameters
351
+ # @option opts [Integer] :limit
352
+ # @option opts [String] :starting_after
353
+ # @option opts [String] :ending_before
354
+ # @option opts [String] :count
355
+ # @return [StudentsResponse]
356
+ def get_students(opts = {})
357
+ data, _status_code, _headers = get_students_with_http_info(opts)
358
+ data
359
+ end
360
+
361
+ # Returns a list of students
362
+ # @param [Hash] opts the optional parameters
363
+ # @option opts [Integer] :limit
364
+ # @option opts [String] :starting_after
365
+ # @option opts [String] :ending_before
366
+ # @option opts [String] :count
367
+ # @return [Array<(StudentsResponse, Fixnum, Hash)>] StudentsResponse data, response status code and response headers
368
+ def get_students_with_http_info(opts = {})
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug 'Calling API: StudentsApi.get_students ...'
371
+ end
372
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
373
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
374
+ end
375
+ # resource path
376
+ local_var_path = '/students'
377
+
378
+ # query parameters
379
+ query_params = {}
380
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
381
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
382
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
383
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
384
+
385
+ # header parameters
386
+ header_params = {}
387
+ # HTTP header 'Accept' (if needed)
388
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
389
+
390
+ # form parameters
391
+ form_params = {}
392
+
393
+ # http body (model)
394
+ post_body = nil
395
+ auth_names = ['oauth']
396
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
397
+ :header_params => header_params,
398
+ :query_params => query_params,
399
+ :form_params => form_params,
400
+ :body => post_body,
401
+ :auth_names => auth_names,
402
+ :return_type => 'StudentsResponse')
403
+ if @api_client.config.debugging
404
+ @api_client.config.logger.debug "API called: StudentsApi#get_students\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
405
+ end
406
+ return data, status_code, headers
407
+ end
408
+ # Returns the teachers for a student
409
+ # @param id
410
+ # @param [Hash] opts the optional parameters
411
+ # @option opts [Integer] :limit
412
+ # @option opts [String] :starting_after
413
+ # @option opts [String] :ending_before
414
+ # @return [TeachersResponse]
415
+ def get_teachers_for_student(id, opts = {})
416
+ data, _status_code, _headers = get_teachers_for_student_with_http_info(id, opts)
417
+ data
418
+ end
419
+
420
+ # Returns the teachers for a student
421
+ # @param id
422
+ # @param [Hash] opts the optional parameters
423
+ # @option opts [Integer] :limit
424
+ # @option opts [String] :starting_after
425
+ # @option opts [String] :ending_before
426
+ # @return [Array<(TeachersResponse, Fixnum, Hash)>] TeachersResponse data, response status code and response headers
427
+ def get_teachers_for_student_with_http_info(id, opts = {})
428
+ if @api_client.config.debugging
429
+ @api_client.config.logger.debug 'Calling API: StudentsApi.get_teachers_for_student ...'
430
+ end
431
+ # verify the required parameter 'id' is set
432
+ if @api_client.config.client_side_validation && id.nil?
433
+ fail ArgumentError, "Missing the required parameter 'id' when calling StudentsApi.get_teachers_for_student"
434
+ end
435
+ # resource path
436
+ local_var_path = '/students/{id}/teachers'.sub('{' + 'id' + '}', id.to_s)
437
+
438
+ # query parameters
439
+ query_params = {}
440
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
441
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
442
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
443
+
444
+ # header parameters
445
+ header_params = {}
446
+ # HTTP header 'Accept' (if needed)
447
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
448
+
449
+ # form parameters
450
+ form_params = {}
451
+
452
+ # http body (model)
453
+ post_body = nil
454
+ auth_names = ['oauth']
455
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
456
+ :header_params => header_params,
457
+ :query_params => query_params,
458
+ :form_params => form_params,
459
+ :body => post_body,
460
+ :auth_names => auth_names,
461
+ :return_type => 'TeachersResponse')
462
+ if @api_client.config.debugging
463
+ @api_client.config.logger.debug "API called: StudentsApi#get_teachers_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
464
+ end
465
+ return data, status_code, headers
466
+ end
467
+ end
468
+ end