commonlit-clever-ruby 2.1.6.beta1 → 2.1.6.beta3

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