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

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 (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
@@ -0,0 +1,2999 @@
1
+ =begin
2
+ #Clever API
3
+
4
+ #The Clever 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: 3.0.51
10
+ =end
11
+
12
+ module Clever
13
+ class DataApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Returns a specific student contact
20
+ # @param id
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [ContactResponse]
23
+ def get_contact(id, opts = {})
24
+ data, _status_code, _headers = get_contact_with_http_info(id, opts)
25
+ data
26
+ end
27
+
28
+ # Returns a specific student contact
29
+ # @param id
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [Array<(ContactResponse, Integer, Hash)>] ContactResponse data, response status code and response headers
32
+ def get_contact_with_http_info(id, opts = {})
33
+ if @api_client.config.debugging
34
+ @api_client.config.logger.debug 'Calling API: DataApi.get_contact ...'
35
+ end
36
+ # verify the required parameter 'id' is set
37
+ if @api_client.config.client_side_validation && id.nil?
38
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_contact"
39
+ end
40
+ # resource path
41
+ local_var_path = '/contacts/{id}'.sub('{' + 'id' + '}', id.to_s)
42
+
43
+ # query parameters
44
+ query_params = opts[:query_params] || {}
45
+
46
+ # header parameters
47
+ header_params = opts[:header_params] || {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+
51
+ # form parameters
52
+ form_params = opts[:form_params] || {}
53
+
54
+ # http body (model)
55
+ post_body = opts[:body]
56
+
57
+ return_type = opts[:return_type] || 'ContactResponse'
58
+
59
+ auth_names = opts[: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 => return_type)
67
+
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: DataApi#get_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ end
71
+ return data, status_code, headers
72
+ end
73
+ # Returns a list of student contacts
74
+ # @param [Hash] opts the optional parameters
75
+ # @option opts [Integer] :limit
76
+ # @option opts [String] :starting_after
77
+ # @option opts [String] :ending_before
78
+ # @option opts [String] :count
79
+ # @return [ContactsResponse]
80
+ def get_contacts(opts = {})
81
+ data, _status_code, _headers = get_contacts_with_http_info(opts)
82
+ data
83
+ end
84
+
85
+ # Returns a list of student contacts
86
+ # @param [Hash] opts the optional parameters
87
+ # @option opts [Integer] :limit
88
+ # @option opts [String] :starting_after
89
+ # @option opts [String] :ending_before
90
+ # @option opts [String] :count
91
+ # @return [Array<(ContactsResponse, Integer, Hash)>] ContactsResponse data, response status code and response headers
92
+ def get_contacts_with_http_info(opts = {})
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug 'Calling API: DataApi.get_contacts ...'
95
+ end
96
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
97
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
98
+ end
99
+ # resource path
100
+ local_var_path = '/contacts'
101
+
102
+ # query parameters
103
+ query_params = opts[:query_params] || {}
104
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
105
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
106
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
107
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
108
+
109
+ # header parameters
110
+ header_params = opts[:header_params] || {}
111
+ # HTTP header 'Accept' (if needed)
112
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
113
+
114
+ # form parameters
115
+ form_params = opts[:form_params] || {}
116
+
117
+ # http body (model)
118
+ post_body = opts[:body]
119
+
120
+ return_type = opts[:return_type] || 'ContactsResponse'
121
+
122
+ auth_names = opts[:auth_names] || ['oauth']
123
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
124
+ :header_params => header_params,
125
+ :query_params => query_params,
126
+ :form_params => form_params,
127
+ :body => post_body,
128
+ :auth_names => auth_names,
129
+ :return_type => return_type)
130
+
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug "API called: DataApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
133
+ end
134
+ return data, status_code, headers
135
+ end
136
+ # Returns the contacts for a student
137
+ # @param id
138
+ # @param [Hash] opts the optional parameters
139
+ # @option opts [Integer] :limit
140
+ # @option opts [String] :starting_after
141
+ # @option opts [String] :ending_before
142
+ # @return [ContactsResponse]
143
+ def get_contacts_for_student(id, opts = {})
144
+ data, _status_code, _headers = get_contacts_for_student_with_http_info(id, opts)
145
+ data
146
+ end
147
+
148
+ # Returns the contacts for a student
149
+ # @param id
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [Integer] :limit
152
+ # @option opts [String] :starting_after
153
+ # @option opts [String] :ending_before
154
+ # @return [Array<(ContactsResponse, Integer, Hash)>] ContactsResponse data, response status code and response headers
155
+ def get_contacts_for_student_with_http_info(id, opts = {})
156
+ if @api_client.config.debugging
157
+ @api_client.config.logger.debug 'Calling API: DataApi.get_contacts_for_student ...'
158
+ end
159
+ # verify the required parameter 'id' is set
160
+ if @api_client.config.client_side_validation && id.nil?
161
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_contacts_for_student"
162
+ end
163
+ # resource path
164
+ local_var_path = '/students/{id}/contacts'.sub('{' + 'id' + '}', id.to_s)
165
+
166
+ # query parameters
167
+ query_params = opts[:query_params] || {}
168
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
169
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
170
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
171
+
172
+ # header parameters
173
+ header_params = opts[:header_params] || {}
174
+ # HTTP header 'Accept' (if needed)
175
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
176
+
177
+ # form parameters
178
+ form_params = opts[:form_params] || {}
179
+
180
+ # http body (model)
181
+ post_body = opts[:body]
182
+
183
+ return_type = opts[:return_type] || 'ContactsResponse'
184
+
185
+ auth_names = opts[:auth_names] || ['oauth']
186
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
187
+ :header_params => header_params,
188
+ :query_params => query_params,
189
+ :form_params => form_params,
190
+ :body => post_body,
191
+ :auth_names => auth_names,
192
+ :return_type => return_type)
193
+
194
+ if @api_client.config.debugging
195
+ @api_client.config.logger.debug "API called: DataApi#get_contacts_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
+ end
197
+ return data, status_code, headers
198
+ end
199
+ # Returns a specific course
200
+ # @param id
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [CourseResponse]
203
+ def get_course(id, opts = {})
204
+ data, _status_code, _headers = get_course_with_http_info(id, opts)
205
+ data
206
+ end
207
+
208
+ # Returns a specific course
209
+ # @param id
210
+ # @param [Hash] opts the optional parameters
211
+ # @return [Array<(CourseResponse, Integer, Hash)>] CourseResponse data, response status code and response headers
212
+ def get_course_with_http_info(id, opts = {})
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug 'Calling API: DataApi.get_course ...'
215
+ end
216
+ # verify the required parameter 'id' is set
217
+ if @api_client.config.client_side_validation && id.nil?
218
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_course"
219
+ end
220
+ # resource path
221
+ local_var_path = '/courses/{id}'.sub('{' + 'id' + '}', id.to_s)
222
+
223
+ # query parameters
224
+ query_params = opts[:query_params] || {}
225
+
226
+ # header parameters
227
+ header_params = opts[:header_params] || {}
228
+ # HTTP header 'Accept' (if needed)
229
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
230
+
231
+ # form parameters
232
+ form_params = opts[:form_params] || {}
233
+
234
+ # http body (model)
235
+ post_body = opts[:body]
236
+
237
+ return_type = opts[:return_type] || 'CourseResponse'
238
+
239
+ auth_names = opts[:auth_names] || ['oauth']
240
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
241
+ :header_params => header_params,
242
+ :query_params => query_params,
243
+ :form_params => form_params,
244
+ :body => post_body,
245
+ :auth_names => auth_names,
246
+ :return_type => return_type)
247
+
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug "API called: DataApi#get_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
250
+ end
251
+ return data, status_code, headers
252
+ end
253
+ # Returns the course for a section
254
+ # @param id
255
+ # @param [Hash] opts the optional parameters
256
+ # @return [CourseResponse]
257
+ def get_course_for_section(id, opts = {})
258
+ data, _status_code, _headers = get_course_for_section_with_http_info(id, opts)
259
+ data
260
+ end
261
+
262
+ # Returns the course for a section
263
+ # @param id
264
+ # @param [Hash] opts the optional parameters
265
+ # @return [Array<(CourseResponse, Integer, Hash)>] CourseResponse data, response status code and response headers
266
+ def get_course_for_section_with_http_info(id, opts = {})
267
+ if @api_client.config.debugging
268
+ @api_client.config.logger.debug 'Calling API: DataApi.get_course_for_section ...'
269
+ end
270
+ # verify the required parameter 'id' is set
271
+ if @api_client.config.client_side_validation && id.nil?
272
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_course_for_section"
273
+ end
274
+ # resource path
275
+ local_var_path = '/sections/{id}/course'.sub('{' + 'id' + '}', id.to_s)
276
+
277
+ # query parameters
278
+ query_params = opts[:query_params] || {}
279
+
280
+ # header parameters
281
+ header_params = opts[:header_params] || {}
282
+ # HTTP header 'Accept' (if needed)
283
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
284
+
285
+ # form parameters
286
+ form_params = opts[:form_params] || {}
287
+
288
+ # http body (model)
289
+ post_body = opts[:body]
290
+
291
+ return_type = opts[:return_type] || 'CourseResponse'
292
+
293
+ auth_names = opts[:auth_names] || ['oauth']
294
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
295
+ :header_params => header_params,
296
+ :query_params => query_params,
297
+ :form_params => form_params,
298
+ :body => post_body,
299
+ :auth_names => auth_names,
300
+ :return_type => return_type)
301
+
302
+ if @api_client.config.debugging
303
+ @api_client.config.logger.debug "API called: DataApi#get_course_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
304
+ end
305
+ return data, status_code, headers
306
+ end
307
+ # Returns a list of courses
308
+ # @param [Hash] opts the optional parameters
309
+ # @option opts [Integer] :limit
310
+ # @option opts [String] :starting_after
311
+ # @option opts [String] :ending_before
312
+ # @option opts [String] :count
313
+ # @return [CoursesResponse]
314
+ def get_courses(opts = {})
315
+ data, _status_code, _headers = get_courses_with_http_info(opts)
316
+ data
317
+ end
318
+
319
+ # Returns a list of courses
320
+ # @param [Hash] opts the optional parameters
321
+ # @option opts [Integer] :limit
322
+ # @option opts [String] :starting_after
323
+ # @option opts [String] :ending_before
324
+ # @option opts [String] :count
325
+ # @return [Array<(CoursesResponse, Integer, Hash)>] CoursesResponse data, response status code and response headers
326
+ def get_courses_with_http_info(opts = {})
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug 'Calling API: DataApi.get_courses ...'
329
+ end
330
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
331
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
332
+ end
333
+ # resource path
334
+ local_var_path = '/courses'
335
+
336
+ # query parameters
337
+ query_params = opts[:query_params] || {}
338
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
339
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
340
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
341
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
342
+
343
+ # header parameters
344
+ header_params = opts[:header_params] || {}
345
+ # HTTP header 'Accept' (if needed)
346
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
347
+
348
+ # form parameters
349
+ form_params = opts[:form_params] || {}
350
+
351
+ # http body (model)
352
+ post_body = opts[:body]
353
+
354
+ return_type = opts[:return_type] || 'CoursesResponse'
355
+
356
+ auth_names = opts[:auth_names] || ['oauth']
357
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
358
+ :header_params => header_params,
359
+ :query_params => query_params,
360
+ :form_params => form_params,
361
+ :body => post_body,
362
+ :auth_names => auth_names,
363
+ :return_type => return_type)
364
+
365
+ if @api_client.config.debugging
366
+ @api_client.config.logger.debug "API called: DataApi#get_courses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
367
+ end
368
+ return data, status_code, headers
369
+ end
370
+ # Returns a specific district
371
+ # @param id
372
+ # @param [Hash] opts the optional parameters
373
+ # @return [DistrictResponse]
374
+ def get_district(id, opts = {})
375
+ data, _status_code, _headers = get_district_with_http_info(id, opts)
376
+ data
377
+ end
378
+
379
+ # Returns a specific district
380
+ # @param id
381
+ # @param [Hash] opts the optional parameters
382
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
383
+ def get_district_with_http_info(id, opts = {})
384
+ if @api_client.config.debugging
385
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district ...'
386
+ end
387
+ # verify the required parameter 'id' is set
388
+ if @api_client.config.client_side_validation && id.nil?
389
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district"
390
+ end
391
+ # resource path
392
+ local_var_path = '/districts/{id}'.sub('{' + 'id' + '}', id.to_s)
393
+
394
+ # query parameters
395
+ query_params = opts[:query_params] || {}
396
+
397
+ # header parameters
398
+ header_params = opts[:header_params] || {}
399
+ # HTTP header 'Accept' (if needed)
400
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
401
+
402
+ # form parameters
403
+ form_params = opts[:form_params] || {}
404
+
405
+ # http body (model)
406
+ post_body = opts[:body]
407
+
408
+ return_type = opts[:return_type] || 'DistrictResponse'
409
+
410
+ auth_names = opts[:auth_names] || ['oauth']
411
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
412
+ :header_params => header_params,
413
+ :query_params => query_params,
414
+ :form_params => form_params,
415
+ :body => post_body,
416
+ :auth_names => auth_names,
417
+ :return_type => return_type)
418
+
419
+ if @api_client.config.debugging
420
+ @api_client.config.logger.debug "API called: DataApi#get_district\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
421
+ end
422
+ return data, status_code, headers
423
+ end
424
+ # Returns a specific district admin
425
+ # @param id
426
+ # @param [Hash] opts the optional parameters
427
+ # @return [DistrictAdminResponse]
428
+ def get_district_admin(id, opts = {})
429
+ data, _status_code, _headers = get_district_admin_with_http_info(id, opts)
430
+ data
431
+ end
432
+
433
+ # Returns a specific district admin
434
+ # @param id
435
+ # @param [Hash] opts the optional parameters
436
+ # @return [Array<(DistrictAdminResponse, Integer, Hash)>] DistrictAdminResponse data, response status code and response headers
437
+ def get_district_admin_with_http_info(id, opts = {})
438
+ if @api_client.config.debugging
439
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_admin ...'
440
+ end
441
+ # verify the required parameter 'id' is set
442
+ if @api_client.config.client_side_validation && id.nil?
443
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_admin"
444
+ end
445
+ # resource path
446
+ local_var_path = '/district_admins/{id}'.sub('{' + 'id' + '}', id.to_s)
447
+
448
+ # query parameters
449
+ query_params = opts[:query_params] || {}
450
+
451
+ # header parameters
452
+ header_params = opts[:header_params] || {}
453
+ # HTTP header 'Accept' (if needed)
454
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
455
+
456
+ # form parameters
457
+ form_params = opts[:form_params] || {}
458
+
459
+ # http body (model)
460
+ post_body = opts[:body]
461
+
462
+ return_type = opts[:return_type] || 'DistrictAdminResponse'
463
+
464
+ auth_names = opts[:auth_names] || ['oauth']
465
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
466
+ :header_params => header_params,
467
+ :query_params => query_params,
468
+ :form_params => form_params,
469
+ :body => post_body,
470
+ :auth_names => auth_names,
471
+ :return_type => return_type)
472
+
473
+ if @api_client.config.debugging
474
+ @api_client.config.logger.debug "API called: DataApi#get_district_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
475
+ end
476
+ return data, status_code, headers
477
+ end
478
+ # Returns a list of district admins
479
+ # @param [Hash] opts the optional parameters
480
+ # @option opts [Integer] :limit
481
+ # @option opts [String] :starting_after
482
+ # @option opts [String] :ending_before
483
+ # @option opts [String] :count
484
+ # @return [DistrictAdminsResponse]
485
+ def get_district_admins(opts = {})
486
+ data, _status_code, _headers = get_district_admins_with_http_info(opts)
487
+ data
488
+ end
489
+
490
+ # Returns a list of district admins
491
+ # @param [Hash] opts the optional parameters
492
+ # @option opts [Integer] :limit
493
+ # @option opts [String] :starting_after
494
+ # @option opts [String] :ending_before
495
+ # @option opts [String] :count
496
+ # @return [Array<(DistrictAdminsResponse, Integer, Hash)>] DistrictAdminsResponse data, response status code and response headers
497
+ def get_district_admins_with_http_info(opts = {})
498
+ if @api_client.config.debugging
499
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_admins ...'
500
+ end
501
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
502
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
503
+ end
504
+ # resource path
505
+ local_var_path = '/district_admins'
506
+
507
+ # query parameters
508
+ query_params = opts[:query_params] || {}
509
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
510
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
511
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
512
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
513
+
514
+ # header parameters
515
+ header_params = opts[:header_params] || {}
516
+ # HTTP header 'Accept' (if needed)
517
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
518
+
519
+ # form parameters
520
+ form_params = opts[:form_params] || {}
521
+
522
+ # http body (model)
523
+ post_body = opts[:body]
524
+
525
+ return_type = opts[:return_type] || 'DistrictAdminsResponse'
526
+
527
+ auth_names = opts[:auth_names] || ['oauth']
528
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
529
+ :header_params => header_params,
530
+ :query_params => query_params,
531
+ :form_params => form_params,
532
+ :body => post_body,
533
+ :auth_names => auth_names,
534
+ :return_type => return_type)
535
+
536
+ if @api_client.config.debugging
537
+ @api_client.config.logger.debug "API called: DataApi#get_district_admins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
538
+ end
539
+ return data, status_code, headers
540
+ end
541
+ # Returns the district for a student contact
542
+ # @param id
543
+ # @param [Hash] opts the optional parameters
544
+ # @return [DistrictResponse]
545
+ def get_district_for_contact(id, opts = {})
546
+ data, _status_code, _headers = get_district_for_contact_with_http_info(id, opts)
547
+ data
548
+ end
549
+
550
+ # Returns the district for a student contact
551
+ # @param id
552
+ # @param [Hash] opts the optional parameters
553
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
554
+ def get_district_for_contact_with_http_info(id, opts = {})
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_contact ...'
557
+ end
558
+ # verify the required parameter 'id' is set
559
+ if @api_client.config.client_side_validation && id.nil?
560
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_contact"
561
+ end
562
+ # resource path
563
+ local_var_path = '/contacts/{id}/district'.sub('{' + 'id' + '}', id.to_s)
564
+
565
+ # query parameters
566
+ query_params = opts[:query_params] || {}
567
+
568
+ # header parameters
569
+ header_params = opts[:header_params] || {}
570
+ # HTTP header 'Accept' (if needed)
571
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
572
+
573
+ # form parameters
574
+ form_params = opts[:form_params] || {}
575
+
576
+ # http body (model)
577
+ post_body = opts[:body]
578
+
579
+ return_type = opts[:return_type] || 'DistrictResponse'
580
+
581
+ auth_names = opts[:auth_names] || ['oauth']
582
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
583
+ :header_params => header_params,
584
+ :query_params => query_params,
585
+ :form_params => form_params,
586
+ :body => post_body,
587
+ :auth_names => auth_names,
588
+ :return_type => return_type)
589
+
590
+ if @api_client.config.debugging
591
+ @api_client.config.logger.debug "API called: DataApi#get_district_for_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
592
+ end
593
+ return data, status_code, headers
594
+ end
595
+ # Returns the district for a course
596
+ # @param id
597
+ # @param [Hash] opts the optional parameters
598
+ # @return [DistrictResponse]
599
+ def get_district_for_course(id, opts = {})
600
+ data, _status_code, _headers = get_district_for_course_with_http_info(id, opts)
601
+ data
602
+ end
603
+
604
+ # Returns the district for a course
605
+ # @param id
606
+ # @param [Hash] opts the optional parameters
607
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
608
+ def get_district_for_course_with_http_info(id, opts = {})
609
+ if @api_client.config.debugging
610
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_course ...'
611
+ end
612
+ # verify the required parameter 'id' is set
613
+ if @api_client.config.client_side_validation && id.nil?
614
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_course"
615
+ end
616
+ # resource path
617
+ local_var_path = '/courses/{id}/district'.sub('{' + 'id' + '}', id.to_s)
618
+
619
+ # query parameters
620
+ query_params = opts[:query_params] || {}
621
+
622
+ # header parameters
623
+ header_params = opts[:header_params] || {}
624
+ # HTTP header 'Accept' (if needed)
625
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
626
+
627
+ # form parameters
628
+ form_params = opts[:form_params] || {}
629
+
630
+ # http body (model)
631
+ post_body = opts[:body]
632
+
633
+ return_type = opts[:return_type] || 'DistrictResponse'
634
+
635
+ auth_names = opts[:auth_names] || ['oauth']
636
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
637
+ :header_params => header_params,
638
+ :query_params => query_params,
639
+ :form_params => form_params,
640
+ :body => post_body,
641
+ :auth_names => auth_names,
642
+ :return_type => return_type)
643
+
644
+ if @api_client.config.debugging
645
+ @api_client.config.logger.debug "API called: DataApi#get_district_for_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
646
+ end
647
+ return data, status_code, headers
648
+ end
649
+ # Returns the district for a district admin
650
+ # @param id
651
+ # @param [Hash] opts the optional parameters
652
+ # @return [DistrictResponse]
653
+ def get_district_for_district_admin(id, opts = {})
654
+ data, _status_code, _headers = get_district_for_district_admin_with_http_info(id, opts)
655
+ data
656
+ end
657
+
658
+ # Returns the district for a district admin
659
+ # @param id
660
+ # @param [Hash] opts the optional parameters
661
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
662
+ def get_district_for_district_admin_with_http_info(id, opts = {})
663
+ if @api_client.config.debugging
664
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_district_admin ...'
665
+ end
666
+ # verify the required parameter 'id' is set
667
+ if @api_client.config.client_side_validation && id.nil?
668
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_district_admin"
669
+ end
670
+ # resource path
671
+ local_var_path = '/district_admins/{id}/district'.sub('{' + 'id' + '}', id.to_s)
672
+
673
+ # query parameters
674
+ query_params = opts[:query_params] || {}
675
+
676
+ # header parameters
677
+ header_params = opts[:header_params] || {}
678
+ # HTTP header 'Accept' (if needed)
679
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
680
+
681
+ # form parameters
682
+ form_params = opts[:form_params] || {}
683
+
684
+ # http body (model)
685
+ post_body = opts[:body]
686
+
687
+ return_type = opts[:return_type] || 'DistrictResponse'
688
+
689
+ auth_names = opts[:auth_names] || ['oauth']
690
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
691
+ :header_params => header_params,
692
+ :query_params => query_params,
693
+ :form_params => form_params,
694
+ :body => post_body,
695
+ :auth_names => auth_names,
696
+ :return_type => return_type)
697
+
698
+ if @api_client.config.debugging
699
+ @api_client.config.logger.debug "API called: DataApi#get_district_for_district_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
700
+ end
701
+ return data, status_code, headers
702
+ end
703
+ # Returns the district for a school
704
+ # @param id
705
+ # @param [Hash] opts the optional parameters
706
+ # @return [DistrictResponse]
707
+ def get_district_for_school(id, opts = {})
708
+ data, _status_code, _headers = get_district_for_school_with_http_info(id, opts)
709
+ data
710
+ end
711
+
712
+ # Returns the district for a school
713
+ # @param id
714
+ # @param [Hash] opts the optional parameters
715
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
716
+ def get_district_for_school_with_http_info(id, opts = {})
717
+ if @api_client.config.debugging
718
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_school ...'
719
+ end
720
+ # verify the required parameter 'id' is set
721
+ if @api_client.config.client_side_validation && id.nil?
722
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_school"
723
+ end
724
+ # resource path
725
+ local_var_path = '/schools/{id}/district'.sub('{' + 'id' + '}', id.to_s)
726
+
727
+ # query parameters
728
+ query_params = opts[:query_params] || {}
729
+
730
+ # header parameters
731
+ header_params = opts[:header_params] || {}
732
+ # HTTP header 'Accept' (if needed)
733
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
734
+
735
+ # form parameters
736
+ form_params = opts[:form_params] || {}
737
+
738
+ # http body (model)
739
+ post_body = opts[:body]
740
+
741
+ return_type = opts[:return_type] || 'DistrictResponse'
742
+
743
+ auth_names = opts[:auth_names] || ['oauth']
744
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
745
+ :header_params => header_params,
746
+ :query_params => query_params,
747
+ :form_params => form_params,
748
+ :body => post_body,
749
+ :auth_names => auth_names,
750
+ :return_type => return_type)
751
+
752
+ if @api_client.config.debugging
753
+ @api_client.config.logger.debug "API called: DataApi#get_district_for_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
754
+ end
755
+ return data, status_code, headers
756
+ end
757
+ # Returns the district for a school admin
758
+ # @param id
759
+ # @param [Hash] opts the optional parameters
760
+ # @return [DistrictResponse]
761
+ def get_district_for_school_admin(id, opts = {})
762
+ data, _status_code, _headers = get_district_for_school_admin_with_http_info(id, opts)
763
+ data
764
+ end
765
+
766
+ # Returns the district for a school admin
767
+ # @param id
768
+ # @param [Hash] opts the optional parameters
769
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
770
+ def get_district_for_school_admin_with_http_info(id, opts = {})
771
+ if @api_client.config.debugging
772
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_school_admin ...'
773
+ end
774
+ # verify the required parameter 'id' is set
775
+ if @api_client.config.client_side_validation && id.nil?
776
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_school_admin"
777
+ end
778
+ # resource path
779
+ local_var_path = '/school_admins/{id}/district'.sub('{' + 'id' + '}', id.to_s)
780
+
781
+ # query parameters
782
+ query_params = opts[:query_params] || {}
783
+
784
+ # header parameters
785
+ header_params = opts[:header_params] || {}
786
+ # HTTP header 'Accept' (if needed)
787
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
788
+
789
+ # form parameters
790
+ form_params = opts[:form_params] || {}
791
+
792
+ # http body (model)
793
+ post_body = opts[:body]
794
+
795
+ return_type = opts[:return_type] || 'DistrictResponse'
796
+
797
+ auth_names = opts[:auth_names] || ['oauth']
798
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
799
+ :header_params => header_params,
800
+ :query_params => query_params,
801
+ :form_params => form_params,
802
+ :body => post_body,
803
+ :auth_names => auth_names,
804
+ :return_type => return_type)
805
+
806
+ if @api_client.config.debugging
807
+ @api_client.config.logger.debug "API called: DataApi#get_district_for_school_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
808
+ end
809
+ return data, status_code, headers
810
+ end
811
+ # Returns the district for a section
812
+ # @param id
813
+ # @param [Hash] opts the optional parameters
814
+ # @return [DistrictResponse]
815
+ def get_district_for_section(id, opts = {})
816
+ data, _status_code, _headers = get_district_for_section_with_http_info(id, opts)
817
+ data
818
+ end
819
+
820
+ # Returns the district for a section
821
+ # @param id
822
+ # @param [Hash] opts the optional parameters
823
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
824
+ def get_district_for_section_with_http_info(id, opts = {})
825
+ if @api_client.config.debugging
826
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_section ...'
827
+ end
828
+ # verify the required parameter 'id' is set
829
+ if @api_client.config.client_side_validation && id.nil?
830
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_section"
831
+ end
832
+ # resource path
833
+ local_var_path = '/sections/{id}/district'.sub('{' + 'id' + '}', id.to_s)
834
+
835
+ # query parameters
836
+ query_params = opts[:query_params] || {}
837
+
838
+ # header parameters
839
+ header_params = opts[:header_params] || {}
840
+ # HTTP header 'Accept' (if needed)
841
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
842
+
843
+ # form parameters
844
+ form_params = opts[:form_params] || {}
845
+
846
+ # http body (model)
847
+ post_body = opts[:body]
848
+
849
+ return_type = opts[:return_type] || 'DistrictResponse'
850
+
851
+ auth_names = opts[:auth_names] || ['oauth']
852
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
853
+ :header_params => header_params,
854
+ :query_params => query_params,
855
+ :form_params => form_params,
856
+ :body => post_body,
857
+ :auth_names => auth_names,
858
+ :return_type => return_type)
859
+
860
+ if @api_client.config.debugging
861
+ @api_client.config.logger.debug "API called: DataApi#get_district_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
862
+ end
863
+ return data, status_code, headers
864
+ end
865
+ # Returns the district for a student
866
+ # @param id
867
+ # @param [Hash] opts the optional parameters
868
+ # @return [DistrictResponse]
869
+ def get_district_for_student(id, opts = {})
870
+ data, _status_code, _headers = get_district_for_student_with_http_info(id, opts)
871
+ data
872
+ end
873
+
874
+ # Returns the district for a student
875
+ # @param id
876
+ # @param [Hash] opts the optional parameters
877
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
878
+ def get_district_for_student_with_http_info(id, opts = {})
879
+ if @api_client.config.debugging
880
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_student ...'
881
+ end
882
+ # verify the required parameter 'id' is set
883
+ if @api_client.config.client_side_validation && id.nil?
884
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_student"
885
+ end
886
+ # resource path
887
+ local_var_path = '/students/{id}/district'.sub('{' + 'id' + '}', id.to_s)
888
+
889
+ # query parameters
890
+ query_params = opts[:query_params] || {}
891
+
892
+ # header parameters
893
+ header_params = opts[:header_params] || {}
894
+ # HTTP header 'Accept' (if needed)
895
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
896
+
897
+ # form parameters
898
+ form_params = opts[:form_params] || {}
899
+
900
+ # http body (model)
901
+ post_body = opts[:body]
902
+
903
+ return_type = opts[:return_type] || 'DistrictResponse'
904
+
905
+ auth_names = opts[:auth_names] || ['oauth']
906
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
907
+ :header_params => header_params,
908
+ :query_params => query_params,
909
+ :form_params => form_params,
910
+ :body => post_body,
911
+ :auth_names => auth_names,
912
+ :return_type => return_type)
913
+
914
+ if @api_client.config.debugging
915
+ @api_client.config.logger.debug "API called: DataApi#get_district_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
916
+ end
917
+ return data, status_code, headers
918
+ end
919
+ # Returns the district for a teacher
920
+ # @param id
921
+ # @param [Hash] opts the optional parameters
922
+ # @return [DistrictResponse]
923
+ def get_district_for_teacher(id, opts = {})
924
+ data, _status_code, _headers = get_district_for_teacher_with_http_info(id, opts)
925
+ data
926
+ end
927
+
928
+ # Returns the district for a teacher
929
+ # @param id
930
+ # @param [Hash] opts the optional parameters
931
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
932
+ def get_district_for_teacher_with_http_info(id, opts = {})
933
+ if @api_client.config.debugging
934
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_teacher ...'
935
+ end
936
+ # verify the required parameter 'id' is set
937
+ if @api_client.config.client_side_validation && id.nil?
938
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_teacher"
939
+ end
940
+ # resource path
941
+ local_var_path = '/teachers/{id}/district'.sub('{' + 'id' + '}', id.to_s)
942
+
943
+ # query parameters
944
+ query_params = opts[:query_params] || {}
945
+
946
+ # header parameters
947
+ header_params = opts[:header_params] || {}
948
+ # HTTP header 'Accept' (if needed)
949
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
950
+
951
+ # form parameters
952
+ form_params = opts[:form_params] || {}
953
+
954
+ # http body (model)
955
+ post_body = opts[:body]
956
+
957
+ return_type = opts[:return_type] || 'DistrictResponse'
958
+
959
+ auth_names = opts[:auth_names] || ['oauth']
960
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
961
+ :header_params => header_params,
962
+ :query_params => query_params,
963
+ :form_params => form_params,
964
+ :body => post_body,
965
+ :auth_names => auth_names,
966
+ :return_type => return_type)
967
+
968
+ if @api_client.config.debugging
969
+ @api_client.config.logger.debug "API called: DataApi#get_district_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
970
+ end
971
+ return data, status_code, headers
972
+ end
973
+ # Returns the district for a term
974
+ # @param id
975
+ # @param [Hash] opts the optional parameters
976
+ # @return [DistrictResponse]
977
+ def get_district_for_term(id, opts = {})
978
+ data, _status_code, _headers = get_district_for_term_with_http_info(id, opts)
979
+ data
980
+ end
981
+
982
+ # Returns the district for a term
983
+ # @param id
984
+ # @param [Hash] opts the optional parameters
985
+ # @return [Array<(DistrictResponse, Integer, Hash)>] DistrictResponse data, response status code and response headers
986
+ def get_district_for_term_with_http_info(id, opts = {})
987
+ if @api_client.config.debugging
988
+ @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_term ...'
989
+ end
990
+ # verify the required parameter 'id' is set
991
+ if @api_client.config.client_side_validation && id.nil?
992
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_term"
993
+ end
994
+ # resource path
995
+ local_var_path = '/terms/{id}/district'.sub('{' + 'id' + '}', id.to_s)
996
+
997
+ # query parameters
998
+ query_params = opts[:query_params] || {}
999
+
1000
+ # header parameters
1001
+ header_params = opts[:header_params] || {}
1002
+ # HTTP header 'Accept' (if needed)
1003
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1004
+
1005
+ # form parameters
1006
+ form_params = opts[:form_params] || {}
1007
+
1008
+ # http body (model)
1009
+ post_body = opts[:body]
1010
+
1011
+ return_type = opts[:return_type] || 'DistrictResponse'
1012
+
1013
+ auth_names = opts[:auth_names] || ['oauth']
1014
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1015
+ :header_params => header_params,
1016
+ :query_params => query_params,
1017
+ :form_params => form_params,
1018
+ :body => post_body,
1019
+ :auth_names => auth_names,
1020
+ :return_type => return_type)
1021
+
1022
+ if @api_client.config.debugging
1023
+ @api_client.config.logger.debug "API called: DataApi#get_district_for_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1024
+ end
1025
+ return data, status_code, headers
1026
+ end
1027
+ # Returns a list of districts. In practice this will only return the one district associated with the bearer token
1028
+ # @param [Hash] opts the optional parameters
1029
+ # @option opts [String] :count
1030
+ # @return [DistrictsResponse]
1031
+ def get_districts(opts = {})
1032
+ data, _status_code, _headers = get_districts_with_http_info(opts)
1033
+ data
1034
+ end
1035
+
1036
+ # Returns a list of districts. In practice this will only return the one district associated with the bearer token
1037
+ # @param [Hash] opts the optional parameters
1038
+ # @option opts [String] :count
1039
+ # @return [Array<(DistrictsResponse, Integer, Hash)>] DistrictsResponse data, response status code and response headers
1040
+ def get_districts_with_http_info(opts = {})
1041
+ if @api_client.config.debugging
1042
+ @api_client.config.logger.debug 'Calling API: DataApi.get_districts ...'
1043
+ end
1044
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
1045
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
1046
+ end
1047
+ # resource path
1048
+ local_var_path = '/districts'
1049
+
1050
+ # query parameters
1051
+ query_params = opts[:query_params] || {}
1052
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1053
+
1054
+ # header parameters
1055
+ header_params = opts[:header_params] || {}
1056
+ # HTTP header 'Accept' (if needed)
1057
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1058
+
1059
+ # form parameters
1060
+ form_params = opts[:form_params] || {}
1061
+
1062
+ # http body (model)
1063
+ post_body = opts[:body]
1064
+
1065
+ return_type = opts[:return_type] || 'DistrictsResponse'
1066
+
1067
+ auth_names = opts[:auth_names] || ['oauth']
1068
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1069
+ :header_params => header_params,
1070
+ :query_params => query_params,
1071
+ :form_params => form_params,
1072
+ :body => post_body,
1073
+ :auth_names => auth_names,
1074
+ :return_type => return_type)
1075
+
1076
+ if @api_client.config.debugging
1077
+ @api_client.config.logger.debug "API called: DataApi#get_districts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1078
+ end
1079
+ return data, status_code, headers
1080
+ end
1081
+ # Returns a specific school
1082
+ # @param id
1083
+ # @param [Hash] opts the optional parameters
1084
+ # @return [SchoolResponse]
1085
+ def get_school(id, opts = {})
1086
+ data, _status_code, _headers = get_school_with_http_info(id, opts)
1087
+ data
1088
+ end
1089
+
1090
+ # Returns a specific school
1091
+ # @param id
1092
+ # @param [Hash] opts the optional parameters
1093
+ # @return [Array<(SchoolResponse, Integer, Hash)>] SchoolResponse data, response status code and response headers
1094
+ def get_school_with_http_info(id, opts = {})
1095
+ if @api_client.config.debugging
1096
+ @api_client.config.logger.debug 'Calling API: DataApi.get_school ...'
1097
+ end
1098
+ # verify the required parameter 'id' is set
1099
+ if @api_client.config.client_side_validation && id.nil?
1100
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school"
1101
+ end
1102
+ # resource path
1103
+ local_var_path = '/schools/{id}'.sub('{' + 'id' + '}', id.to_s)
1104
+
1105
+ # query parameters
1106
+ query_params = opts[:query_params] || {}
1107
+
1108
+ # header parameters
1109
+ header_params = opts[:header_params] || {}
1110
+ # HTTP header 'Accept' (if needed)
1111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1112
+
1113
+ # form parameters
1114
+ form_params = opts[:form_params] || {}
1115
+
1116
+ # http body (model)
1117
+ post_body = opts[:body]
1118
+
1119
+ return_type = opts[:return_type] || 'SchoolResponse'
1120
+
1121
+ auth_names = opts[:auth_names] || ['oauth']
1122
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1123
+ :header_params => header_params,
1124
+ :query_params => query_params,
1125
+ :form_params => form_params,
1126
+ :body => post_body,
1127
+ :auth_names => auth_names,
1128
+ :return_type => return_type)
1129
+
1130
+ if @api_client.config.debugging
1131
+ @api_client.config.logger.debug "API called: DataApi#get_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1132
+ end
1133
+ return data, status_code, headers
1134
+ end
1135
+ # Returns a specific school admin
1136
+ # @param id
1137
+ # @param [Hash] opts the optional parameters
1138
+ # @return [SchoolAdminResponse]
1139
+ def get_school_admin(id, opts = {})
1140
+ data, _status_code, _headers = get_school_admin_with_http_info(id, opts)
1141
+ data
1142
+ end
1143
+
1144
+ # Returns a specific school admin
1145
+ # @param id
1146
+ # @param [Hash] opts the optional parameters
1147
+ # @return [Array<(SchoolAdminResponse, Integer, Hash)>] SchoolAdminResponse data, response status code and response headers
1148
+ def get_school_admin_with_http_info(id, opts = {})
1149
+ if @api_client.config.debugging
1150
+ @api_client.config.logger.debug 'Calling API: DataApi.get_school_admin ...'
1151
+ end
1152
+ # verify the required parameter 'id' is set
1153
+ if @api_client.config.client_side_validation && id.nil?
1154
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school_admin"
1155
+ end
1156
+ # resource path
1157
+ local_var_path = '/school_admins/{id}'.sub('{' + 'id' + '}', id.to_s)
1158
+
1159
+ # query parameters
1160
+ query_params = opts[:query_params] || {}
1161
+
1162
+ # header parameters
1163
+ header_params = opts[:header_params] || {}
1164
+ # HTTP header 'Accept' (if needed)
1165
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1166
+
1167
+ # form parameters
1168
+ form_params = opts[:form_params] || {}
1169
+
1170
+ # http body (model)
1171
+ post_body = opts[:body]
1172
+
1173
+ return_type = opts[:return_type] || 'SchoolAdminResponse'
1174
+
1175
+ auth_names = opts[:auth_names] || ['oauth']
1176
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1177
+ :header_params => header_params,
1178
+ :query_params => query_params,
1179
+ :form_params => form_params,
1180
+ :body => post_body,
1181
+ :auth_names => auth_names,
1182
+ :return_type => return_type)
1183
+
1184
+ if @api_client.config.debugging
1185
+ @api_client.config.logger.debug "API called: DataApi#get_school_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1186
+ end
1187
+ return data, status_code, headers
1188
+ end
1189
+ # Returns a list of school admins
1190
+ # @param [Hash] opts the optional parameters
1191
+ # @option opts [Integer] :limit
1192
+ # @option opts [String] :starting_after
1193
+ # @option opts [String] :ending_before
1194
+ # @option opts [String] :count
1195
+ # @return [SchoolAdminsResponse]
1196
+ def get_school_admins(opts = {})
1197
+ data, _status_code, _headers = get_school_admins_with_http_info(opts)
1198
+ data
1199
+ end
1200
+
1201
+ # Returns a list of school admins
1202
+ # @param [Hash] opts the optional parameters
1203
+ # @option opts [Integer] :limit
1204
+ # @option opts [String] :starting_after
1205
+ # @option opts [String] :ending_before
1206
+ # @option opts [String] :count
1207
+ # @return [Array<(SchoolAdminsResponse, Integer, Hash)>] SchoolAdminsResponse data, response status code and response headers
1208
+ def get_school_admins_with_http_info(opts = {})
1209
+ if @api_client.config.debugging
1210
+ @api_client.config.logger.debug 'Calling API: DataApi.get_school_admins ...'
1211
+ end
1212
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
1213
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
1214
+ end
1215
+ # resource path
1216
+ local_var_path = '/school_admins'
1217
+
1218
+ # query parameters
1219
+ query_params = opts[:query_params] || {}
1220
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1221
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
1222
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
1223
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1224
+
1225
+ # header parameters
1226
+ header_params = opts[:header_params] || {}
1227
+ # HTTP header 'Accept' (if needed)
1228
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1229
+
1230
+ # form parameters
1231
+ form_params = opts[:form_params] || {}
1232
+
1233
+ # http body (model)
1234
+ post_body = opts[:body]
1235
+
1236
+ return_type = opts[:return_type] || 'SchoolAdminsResponse'
1237
+
1238
+ auth_names = opts[:auth_names] || ['oauth']
1239
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1240
+ :header_params => header_params,
1241
+ :query_params => query_params,
1242
+ :form_params => form_params,
1243
+ :body => post_body,
1244
+ :auth_names => auth_names,
1245
+ :return_type => return_type)
1246
+
1247
+ if @api_client.config.debugging
1248
+ @api_client.config.logger.debug "API called: DataApi#get_school_admins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1249
+ end
1250
+ return data, status_code, headers
1251
+ end
1252
+ # Returns the school for a section
1253
+ # @param id
1254
+ # @param [Hash] opts the optional parameters
1255
+ # @return [SchoolResponse]
1256
+ def get_school_for_section(id, opts = {})
1257
+ data, _status_code, _headers = get_school_for_section_with_http_info(id, opts)
1258
+ data
1259
+ end
1260
+
1261
+ # Returns the school for a section
1262
+ # @param id
1263
+ # @param [Hash] opts the optional parameters
1264
+ # @return [Array<(SchoolResponse, Integer, Hash)>] SchoolResponse data, response status code and response headers
1265
+ def get_school_for_section_with_http_info(id, opts = {})
1266
+ if @api_client.config.debugging
1267
+ @api_client.config.logger.debug 'Calling API: DataApi.get_school_for_section ...'
1268
+ end
1269
+ # verify the required parameter 'id' is set
1270
+ if @api_client.config.client_side_validation && id.nil?
1271
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school_for_section"
1272
+ end
1273
+ # resource path
1274
+ local_var_path = '/sections/{id}/school'.sub('{' + 'id' + '}', id.to_s)
1275
+
1276
+ # query parameters
1277
+ query_params = opts[:query_params] || {}
1278
+
1279
+ # header parameters
1280
+ header_params = opts[:header_params] || {}
1281
+ # HTTP header 'Accept' (if needed)
1282
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1283
+
1284
+ # form parameters
1285
+ form_params = opts[:form_params] || {}
1286
+
1287
+ # http body (model)
1288
+ post_body = opts[:body]
1289
+
1290
+ return_type = opts[:return_type] || 'SchoolResponse'
1291
+
1292
+ auth_names = opts[:auth_names] || ['oauth']
1293
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1294
+ :header_params => header_params,
1295
+ :query_params => query_params,
1296
+ :form_params => form_params,
1297
+ :body => post_body,
1298
+ :auth_names => auth_names,
1299
+ :return_type => return_type)
1300
+
1301
+ if @api_client.config.debugging
1302
+ @api_client.config.logger.debug "API called: DataApi#get_school_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1303
+ end
1304
+ return data, status_code, headers
1305
+ end
1306
+ # Returns the primary school for a student
1307
+ # @param id
1308
+ # @param [Hash] opts the optional parameters
1309
+ # @return [SchoolResponse]
1310
+ def get_school_for_student(id, opts = {})
1311
+ data, _status_code, _headers = get_school_for_student_with_http_info(id, opts)
1312
+ data
1313
+ end
1314
+
1315
+ # Returns the primary school for a student
1316
+ # @param id
1317
+ # @param [Hash] opts the optional parameters
1318
+ # @return [Array<(SchoolResponse, Integer, Hash)>] SchoolResponse data, response status code and response headers
1319
+ def get_school_for_student_with_http_info(id, opts = {})
1320
+ if @api_client.config.debugging
1321
+ @api_client.config.logger.debug 'Calling API: DataApi.get_school_for_student ...'
1322
+ end
1323
+ # verify the required parameter 'id' is set
1324
+ if @api_client.config.client_side_validation && id.nil?
1325
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school_for_student"
1326
+ end
1327
+ # resource path
1328
+ local_var_path = '/students/{id}/school'.sub('{' + 'id' + '}', id.to_s)
1329
+
1330
+ # query parameters
1331
+ query_params = opts[:query_params] || {}
1332
+
1333
+ # header parameters
1334
+ header_params = opts[:header_params] || {}
1335
+ # HTTP header 'Accept' (if needed)
1336
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1337
+
1338
+ # form parameters
1339
+ form_params = opts[:form_params] || {}
1340
+
1341
+ # http body (model)
1342
+ post_body = opts[:body]
1343
+
1344
+ return_type = opts[:return_type] || 'SchoolResponse'
1345
+
1346
+ auth_names = opts[:auth_names] || ['oauth']
1347
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1348
+ :header_params => header_params,
1349
+ :query_params => query_params,
1350
+ :form_params => form_params,
1351
+ :body => post_body,
1352
+ :auth_names => auth_names,
1353
+ :return_type => return_type)
1354
+
1355
+ if @api_client.config.debugging
1356
+ @api_client.config.logger.debug "API called: DataApi#get_school_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1357
+ end
1358
+ return data, status_code, headers
1359
+ end
1360
+ # Retrieves school info for a teacher.
1361
+ # @param id
1362
+ # @param [Hash] opts the optional parameters
1363
+ # @return [SchoolResponse]
1364
+ def get_school_for_teacher(id, opts = {})
1365
+ data, _status_code, _headers = get_school_for_teacher_with_http_info(id, opts)
1366
+ data
1367
+ end
1368
+
1369
+ # Retrieves school info for a teacher.
1370
+ # @param id
1371
+ # @param [Hash] opts the optional parameters
1372
+ # @return [Array<(SchoolResponse, Integer, Hash)>] SchoolResponse data, response status code and response headers
1373
+ def get_school_for_teacher_with_http_info(id, opts = {})
1374
+ if @api_client.config.debugging
1375
+ @api_client.config.logger.debug 'Calling API: DataApi.get_school_for_teacher ...'
1376
+ end
1377
+ # verify the required parameter 'id' is set
1378
+ if @api_client.config.client_side_validation && id.nil?
1379
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school_for_teacher"
1380
+ end
1381
+ # resource path
1382
+ local_var_path = '/teachers/{id}/school'.sub('{' + 'id' + '}', id.to_s)
1383
+
1384
+ # query parameters
1385
+ query_params = opts[:query_params] || {}
1386
+
1387
+ # header parameters
1388
+ header_params = opts[:header_params] || {}
1389
+ # HTTP header 'Accept' (if needed)
1390
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1391
+
1392
+ # form parameters
1393
+ form_params = opts[:form_params] || {}
1394
+
1395
+ # http body (model)
1396
+ post_body = opts[:body]
1397
+
1398
+ return_type = opts[:return_type] || 'SchoolResponse'
1399
+
1400
+ auth_names = opts[:auth_names] || ['oauth']
1401
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1402
+ :header_params => header_params,
1403
+ :query_params => query_params,
1404
+ :form_params => form_params,
1405
+ :body => post_body,
1406
+ :auth_names => auth_names,
1407
+ :return_type => return_type)
1408
+
1409
+ if @api_client.config.debugging
1410
+ @api_client.config.logger.debug "API called: DataApi#get_school_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1411
+ end
1412
+ return data, status_code, headers
1413
+ end
1414
+ # Returns a list of schools
1415
+ # @param [Hash] opts the optional parameters
1416
+ # @option opts [Integer] :limit
1417
+ # @option opts [String] :starting_after
1418
+ # @option opts [String] :ending_before
1419
+ # @option opts [String] :count
1420
+ # @return [SchoolsResponse]
1421
+ def get_schools(opts = {})
1422
+ data, _status_code, _headers = get_schools_with_http_info(opts)
1423
+ data
1424
+ end
1425
+
1426
+ # Returns a list of schools
1427
+ # @param [Hash] opts the optional parameters
1428
+ # @option opts [Integer] :limit
1429
+ # @option opts [String] :starting_after
1430
+ # @option opts [String] :ending_before
1431
+ # @option opts [String] :count
1432
+ # @return [Array<(SchoolsResponse, Integer, Hash)>] SchoolsResponse data, response status code and response headers
1433
+ def get_schools_with_http_info(opts = {})
1434
+ if @api_client.config.debugging
1435
+ @api_client.config.logger.debug 'Calling API: DataApi.get_schools ...'
1436
+ end
1437
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
1438
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
1439
+ end
1440
+ # resource path
1441
+ local_var_path = '/schools'
1442
+
1443
+ # query parameters
1444
+ query_params = opts[:query_params] || {}
1445
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1446
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
1447
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
1448
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1449
+
1450
+ # header parameters
1451
+ header_params = opts[:header_params] || {}
1452
+ # HTTP header 'Accept' (if needed)
1453
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1454
+
1455
+ # form parameters
1456
+ form_params = opts[:form_params] || {}
1457
+
1458
+ # http body (model)
1459
+ post_body = opts[:body]
1460
+
1461
+ return_type = opts[:return_type] || 'SchoolsResponse'
1462
+
1463
+ auth_names = opts[:auth_names] || ['oauth']
1464
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1465
+ :header_params => header_params,
1466
+ :query_params => query_params,
1467
+ :form_params => form_params,
1468
+ :body => post_body,
1469
+ :auth_names => auth_names,
1470
+ :return_type => return_type)
1471
+
1472
+ if @api_client.config.debugging
1473
+ @api_client.config.logger.debug "API called: DataApi#get_schools\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1474
+ end
1475
+ return data, status_code, headers
1476
+ end
1477
+ # Returns the schools for a school admin
1478
+ # @param id
1479
+ # @param [Hash] opts the optional parameters
1480
+ # @option opts [Integer] :limit
1481
+ # @option opts [String] :starting_after
1482
+ # @option opts [String] :ending_before
1483
+ # @return [SchoolsResponse]
1484
+ def get_schools_for_school_admin(id, opts = {})
1485
+ data, _status_code, _headers = get_schools_for_school_admin_with_http_info(id, opts)
1486
+ data
1487
+ end
1488
+
1489
+ # Returns the schools for a school admin
1490
+ # @param id
1491
+ # @param [Hash] opts the optional parameters
1492
+ # @option opts [Integer] :limit
1493
+ # @option opts [String] :starting_after
1494
+ # @option opts [String] :ending_before
1495
+ # @return [Array<(SchoolsResponse, Integer, Hash)>] SchoolsResponse data, response status code and response headers
1496
+ def get_schools_for_school_admin_with_http_info(id, opts = {})
1497
+ if @api_client.config.debugging
1498
+ @api_client.config.logger.debug 'Calling API: DataApi.get_schools_for_school_admin ...'
1499
+ end
1500
+ # verify the required parameter 'id' is set
1501
+ if @api_client.config.client_side_validation && id.nil?
1502
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_schools_for_school_admin"
1503
+ end
1504
+ # resource path
1505
+ local_var_path = '/school_admins/{id}/schools'.sub('{' + 'id' + '}', id.to_s)
1506
+
1507
+ # query parameters
1508
+ query_params = opts[:query_params] || {}
1509
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1510
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
1511
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
1512
+
1513
+ # header parameters
1514
+ header_params = opts[:header_params] || {}
1515
+ # HTTP header 'Accept' (if needed)
1516
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1517
+
1518
+ # form parameters
1519
+ form_params = opts[:form_params] || {}
1520
+
1521
+ # http body (model)
1522
+ post_body = opts[:body]
1523
+
1524
+ return_type = opts[:return_type] || 'SchoolsResponse'
1525
+
1526
+ auth_names = opts[:auth_names] || ['oauth']
1527
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1528
+ :header_params => header_params,
1529
+ :query_params => query_params,
1530
+ :form_params => form_params,
1531
+ :body => post_body,
1532
+ :auth_names => auth_names,
1533
+ :return_type => return_type)
1534
+
1535
+ if @api_client.config.debugging
1536
+ @api_client.config.logger.debug "API called: DataApi#get_schools_for_school_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1537
+ end
1538
+ return data, status_code, headers
1539
+ end
1540
+ # Returns the schools for a student
1541
+ # @param id
1542
+ # @param [Hash] opts the optional parameters
1543
+ # @option opts [Integer] :limit
1544
+ # @option opts [String] :starting_after
1545
+ # @option opts [String] :ending_before
1546
+ # @return [SchoolsResponse]
1547
+ def get_schools_for_student(id, opts = {})
1548
+ data, _status_code, _headers = get_schools_for_student_with_http_info(id, opts)
1549
+ data
1550
+ end
1551
+
1552
+ # Returns the schools for a student
1553
+ # @param id
1554
+ # @param [Hash] opts the optional parameters
1555
+ # @option opts [Integer] :limit
1556
+ # @option opts [String] :starting_after
1557
+ # @option opts [String] :ending_before
1558
+ # @return [Array<(SchoolsResponse, Integer, Hash)>] SchoolsResponse data, response status code and response headers
1559
+ def get_schools_for_student_with_http_info(id, opts = {})
1560
+ if @api_client.config.debugging
1561
+ @api_client.config.logger.debug 'Calling API: DataApi.get_schools_for_student ...'
1562
+ end
1563
+ # verify the required parameter 'id' is set
1564
+ if @api_client.config.client_side_validation && id.nil?
1565
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_schools_for_student"
1566
+ end
1567
+ # resource path
1568
+ local_var_path = '/students/{id}/schools'.sub('{' + 'id' + '}', id.to_s)
1569
+
1570
+ # query parameters
1571
+ query_params = opts[:query_params] || {}
1572
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1573
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
1574
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
1575
+
1576
+ # header parameters
1577
+ header_params = opts[:header_params] || {}
1578
+ # HTTP header 'Accept' (if needed)
1579
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1580
+
1581
+ # form parameters
1582
+ form_params = opts[:form_params] || {}
1583
+
1584
+ # http body (model)
1585
+ post_body = opts[:body]
1586
+
1587
+ return_type = opts[:return_type] || 'SchoolsResponse'
1588
+
1589
+ auth_names = opts[:auth_names] || ['oauth']
1590
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1591
+ :header_params => header_params,
1592
+ :query_params => query_params,
1593
+ :form_params => form_params,
1594
+ :body => post_body,
1595
+ :auth_names => auth_names,
1596
+ :return_type => return_type)
1597
+
1598
+ if @api_client.config.debugging
1599
+ @api_client.config.logger.debug "API called: DataApi#get_schools_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1600
+ end
1601
+ return data, status_code, headers
1602
+ end
1603
+ # Returns the schools for a teacher
1604
+ # @param id
1605
+ # @param [Hash] opts the optional parameters
1606
+ # @option opts [Integer] :limit
1607
+ # @option opts [String] :starting_after
1608
+ # @option opts [String] :ending_before
1609
+ # @return [SchoolsResponse]
1610
+ def get_schools_for_teacher(id, opts = {})
1611
+ data, _status_code, _headers = get_schools_for_teacher_with_http_info(id, opts)
1612
+ data
1613
+ end
1614
+
1615
+ # Returns the schools for a teacher
1616
+ # @param id
1617
+ # @param [Hash] opts the optional parameters
1618
+ # @option opts [Integer] :limit
1619
+ # @option opts [String] :starting_after
1620
+ # @option opts [String] :ending_before
1621
+ # @return [Array<(SchoolsResponse, Integer, Hash)>] SchoolsResponse data, response status code and response headers
1622
+ def get_schools_for_teacher_with_http_info(id, opts = {})
1623
+ if @api_client.config.debugging
1624
+ @api_client.config.logger.debug 'Calling API: DataApi.get_schools_for_teacher ...'
1625
+ end
1626
+ # verify the required parameter 'id' is set
1627
+ if @api_client.config.client_side_validation && id.nil?
1628
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_schools_for_teacher"
1629
+ end
1630
+ # resource path
1631
+ local_var_path = '/teachers/{id}/schools'.sub('{' + 'id' + '}', id.to_s)
1632
+
1633
+ # query parameters
1634
+ query_params = opts[:query_params] || {}
1635
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1636
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
1637
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
1638
+
1639
+ # header parameters
1640
+ header_params = opts[:header_params] || {}
1641
+ # HTTP header 'Accept' (if needed)
1642
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1643
+
1644
+ # form parameters
1645
+ form_params = opts[:form_params] || {}
1646
+
1647
+ # http body (model)
1648
+ post_body = opts[:body]
1649
+
1650
+ return_type = opts[:return_type] || 'SchoolsResponse'
1651
+
1652
+ auth_names = opts[:auth_names] || ['oauth']
1653
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1654
+ :header_params => header_params,
1655
+ :query_params => query_params,
1656
+ :form_params => form_params,
1657
+ :body => post_body,
1658
+ :auth_names => auth_names,
1659
+ :return_type => return_type)
1660
+
1661
+ if @api_client.config.debugging
1662
+ @api_client.config.logger.debug "API called: DataApi#get_schools_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1663
+ end
1664
+ return data, status_code, headers
1665
+ end
1666
+ # Returns a specific section
1667
+ # @param id
1668
+ # @param [Hash] opts the optional parameters
1669
+ # @return [SectionResponse]
1670
+ def get_section(id, opts = {})
1671
+ data, _status_code, _headers = get_section_with_http_info(id, opts)
1672
+ data
1673
+ end
1674
+
1675
+ # Returns a specific section
1676
+ # @param id
1677
+ # @param [Hash] opts the optional parameters
1678
+ # @return [Array<(SectionResponse, Integer, Hash)>] SectionResponse data, response status code and response headers
1679
+ def get_section_with_http_info(id, opts = {})
1680
+ if @api_client.config.debugging
1681
+ @api_client.config.logger.debug 'Calling API: DataApi.get_section ...'
1682
+ end
1683
+ # verify the required parameter 'id' is set
1684
+ if @api_client.config.client_side_validation && id.nil?
1685
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_section"
1686
+ end
1687
+ # resource path
1688
+ local_var_path = '/sections/{id}'.sub('{' + 'id' + '}', id.to_s)
1689
+
1690
+ # query parameters
1691
+ query_params = opts[:query_params] || {}
1692
+
1693
+ # header parameters
1694
+ header_params = opts[:header_params] || {}
1695
+ # HTTP header 'Accept' (if needed)
1696
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1697
+
1698
+ # form parameters
1699
+ form_params = opts[:form_params] || {}
1700
+
1701
+ # http body (model)
1702
+ post_body = opts[:body]
1703
+
1704
+ return_type = opts[:return_type] || 'SectionResponse'
1705
+
1706
+ auth_names = opts[:auth_names] || ['oauth']
1707
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1708
+ :header_params => header_params,
1709
+ :query_params => query_params,
1710
+ :form_params => form_params,
1711
+ :body => post_body,
1712
+ :auth_names => auth_names,
1713
+ :return_type => return_type)
1714
+
1715
+ if @api_client.config.debugging
1716
+ @api_client.config.logger.debug "API called: DataApi#get_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1717
+ end
1718
+ return data, status_code, headers
1719
+ end
1720
+ # Returns a list of sections
1721
+ # @param [Hash] opts the optional parameters
1722
+ # @option opts [Integer] :limit
1723
+ # @option opts [String] :starting_after
1724
+ # @option opts [String] :ending_before
1725
+ # @option opts [String] :count
1726
+ # @return [SectionsResponse]
1727
+ def get_sections(opts = {})
1728
+ data, _status_code, _headers = get_sections_with_http_info(opts)
1729
+ data
1730
+ end
1731
+
1732
+ # Returns a list of sections
1733
+ # @param [Hash] opts the optional parameters
1734
+ # @option opts [Integer] :limit
1735
+ # @option opts [String] :starting_after
1736
+ # @option opts [String] :ending_before
1737
+ # @option opts [String] :count
1738
+ # @return [Array<(SectionsResponse, Integer, Hash)>] SectionsResponse data, response status code and response headers
1739
+ def get_sections_with_http_info(opts = {})
1740
+ if @api_client.config.debugging
1741
+ @api_client.config.logger.debug 'Calling API: DataApi.get_sections ...'
1742
+ end
1743
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
1744
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
1745
+ end
1746
+ # resource path
1747
+ local_var_path = '/sections'
1748
+
1749
+ # query parameters
1750
+ query_params = opts[:query_params] || {}
1751
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1752
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
1753
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
1754
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
1755
+
1756
+ # header parameters
1757
+ header_params = opts[:header_params] || {}
1758
+ # HTTP header 'Accept' (if needed)
1759
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1760
+
1761
+ # form parameters
1762
+ form_params = opts[:form_params] || {}
1763
+
1764
+ # http body (model)
1765
+ post_body = opts[:body]
1766
+
1767
+ return_type = opts[:return_type] || 'SectionsResponse'
1768
+
1769
+ auth_names = opts[:auth_names] || ['oauth']
1770
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1771
+ :header_params => header_params,
1772
+ :query_params => query_params,
1773
+ :form_params => form_params,
1774
+ :body => post_body,
1775
+ :auth_names => auth_names,
1776
+ :return_type => return_type)
1777
+
1778
+ if @api_client.config.debugging
1779
+ @api_client.config.logger.debug "API called: DataApi#get_sections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1780
+ end
1781
+ return data, status_code, headers
1782
+ end
1783
+ # Returns the sections for a Courses
1784
+ # @param id
1785
+ # @param [Hash] opts the optional parameters
1786
+ # @option opts [Integer] :limit
1787
+ # @option opts [String] :starting_after
1788
+ # @option opts [String] :ending_before
1789
+ # @return [SectionsResponse]
1790
+ def get_sections_for_course(id, opts = {})
1791
+ data, _status_code, _headers = get_sections_for_course_with_http_info(id, opts)
1792
+ data
1793
+ end
1794
+
1795
+ # Returns the sections for a Courses
1796
+ # @param id
1797
+ # @param [Hash] opts the optional parameters
1798
+ # @option opts [Integer] :limit
1799
+ # @option opts [String] :starting_after
1800
+ # @option opts [String] :ending_before
1801
+ # @return [Array<(SectionsResponse, Integer, Hash)>] SectionsResponse data, response status code and response headers
1802
+ def get_sections_for_course_with_http_info(id, opts = {})
1803
+ if @api_client.config.debugging
1804
+ @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_course ...'
1805
+ end
1806
+ # verify the required parameter 'id' is set
1807
+ if @api_client.config.client_side_validation && id.nil?
1808
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_course"
1809
+ end
1810
+ # resource path
1811
+ local_var_path = '/courses/{id}/sections'.sub('{' + 'id' + '}', id.to_s)
1812
+
1813
+ # query parameters
1814
+ query_params = opts[:query_params] || {}
1815
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1816
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
1817
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
1818
+
1819
+ # header parameters
1820
+ header_params = opts[:header_params] || {}
1821
+ # HTTP header 'Accept' (if needed)
1822
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1823
+
1824
+ # form parameters
1825
+ form_params = opts[:form_params] || {}
1826
+
1827
+ # http body (model)
1828
+ post_body = opts[:body]
1829
+
1830
+ return_type = opts[:return_type] || 'SectionsResponse'
1831
+
1832
+ auth_names = opts[:auth_names] || ['oauth']
1833
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1834
+ :header_params => header_params,
1835
+ :query_params => query_params,
1836
+ :form_params => form_params,
1837
+ :body => post_body,
1838
+ :auth_names => auth_names,
1839
+ :return_type => return_type)
1840
+
1841
+ if @api_client.config.debugging
1842
+ @api_client.config.logger.debug "API called: DataApi#get_sections_for_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1843
+ end
1844
+ return data, status_code, headers
1845
+ end
1846
+ # Returns the sections for a school
1847
+ # @param id
1848
+ # @param [Hash] opts the optional parameters
1849
+ # @option opts [Integer] :limit
1850
+ # @option opts [String] :starting_after
1851
+ # @option opts [String] :ending_before
1852
+ # @return [SectionsResponse]
1853
+ def get_sections_for_school(id, opts = {})
1854
+ data, _status_code, _headers = get_sections_for_school_with_http_info(id, opts)
1855
+ data
1856
+ end
1857
+
1858
+ # Returns the sections for a school
1859
+ # @param id
1860
+ # @param [Hash] opts the optional parameters
1861
+ # @option opts [Integer] :limit
1862
+ # @option opts [String] :starting_after
1863
+ # @option opts [String] :ending_before
1864
+ # @return [Array<(SectionsResponse, Integer, Hash)>] SectionsResponse data, response status code and response headers
1865
+ def get_sections_for_school_with_http_info(id, opts = {})
1866
+ if @api_client.config.debugging
1867
+ @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_school ...'
1868
+ end
1869
+ # verify the required parameter 'id' is set
1870
+ if @api_client.config.client_side_validation && id.nil?
1871
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_school"
1872
+ end
1873
+ # resource path
1874
+ local_var_path = '/schools/{id}/sections'.sub('{' + 'id' + '}', id.to_s)
1875
+
1876
+ # query parameters
1877
+ query_params = opts[:query_params] || {}
1878
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1879
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
1880
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
1881
+
1882
+ # header parameters
1883
+ header_params = opts[:header_params] || {}
1884
+ # HTTP header 'Accept' (if needed)
1885
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1886
+
1887
+ # form parameters
1888
+ form_params = opts[:form_params] || {}
1889
+
1890
+ # http body (model)
1891
+ post_body = opts[:body]
1892
+
1893
+ return_type = opts[:return_type] || 'SectionsResponse'
1894
+
1895
+ auth_names = opts[:auth_names] || ['oauth']
1896
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1897
+ :header_params => header_params,
1898
+ :query_params => query_params,
1899
+ :form_params => form_params,
1900
+ :body => post_body,
1901
+ :auth_names => auth_names,
1902
+ :return_type => return_type)
1903
+
1904
+ if @api_client.config.debugging
1905
+ @api_client.config.logger.debug "API called: DataApi#get_sections_for_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1906
+ end
1907
+ return data, status_code, headers
1908
+ end
1909
+ # Returns the sections for a student
1910
+ # @param id
1911
+ # @param [Hash] opts the optional parameters
1912
+ # @option opts [Integer] :limit
1913
+ # @option opts [String] :starting_after
1914
+ # @option opts [String] :ending_before
1915
+ # @return [SectionsResponse]
1916
+ def get_sections_for_student(id, opts = {})
1917
+ data, _status_code, _headers = get_sections_for_student_with_http_info(id, opts)
1918
+ data
1919
+ end
1920
+
1921
+ # Returns the sections for a student
1922
+ # @param id
1923
+ # @param [Hash] opts the optional parameters
1924
+ # @option opts [Integer] :limit
1925
+ # @option opts [String] :starting_after
1926
+ # @option opts [String] :ending_before
1927
+ # @return [Array<(SectionsResponse, Integer, Hash)>] SectionsResponse data, response status code and response headers
1928
+ def get_sections_for_student_with_http_info(id, opts = {})
1929
+ if @api_client.config.debugging
1930
+ @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_student ...'
1931
+ end
1932
+ # verify the required parameter 'id' is set
1933
+ if @api_client.config.client_side_validation && id.nil?
1934
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_student"
1935
+ end
1936
+ # resource path
1937
+ local_var_path = '/students/{id}/sections'.sub('{' + 'id' + '}', id.to_s)
1938
+
1939
+ # query parameters
1940
+ query_params = opts[:query_params] || {}
1941
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1942
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
1943
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
1944
+
1945
+ # header parameters
1946
+ header_params = opts[:header_params] || {}
1947
+ # HTTP header 'Accept' (if needed)
1948
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1949
+
1950
+ # form parameters
1951
+ form_params = opts[:form_params] || {}
1952
+
1953
+ # http body (model)
1954
+ post_body = opts[:body]
1955
+
1956
+ return_type = opts[:return_type] || 'SectionsResponse'
1957
+
1958
+ auth_names = opts[:auth_names] || ['oauth']
1959
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1960
+ :header_params => header_params,
1961
+ :query_params => query_params,
1962
+ :form_params => form_params,
1963
+ :body => post_body,
1964
+ :auth_names => auth_names,
1965
+ :return_type => return_type)
1966
+
1967
+ if @api_client.config.debugging
1968
+ @api_client.config.logger.debug "API called: DataApi#get_sections_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1969
+ end
1970
+ return data, status_code, headers
1971
+ end
1972
+ # Returns the sections for a teacher
1973
+ # @param id
1974
+ # @param [Hash] opts the optional parameters
1975
+ # @option opts [Integer] :limit
1976
+ # @option opts [String] :starting_after
1977
+ # @option opts [String] :ending_before
1978
+ # @return [SectionsResponse]
1979
+ def get_sections_for_teacher(id, opts = {})
1980
+ data, _status_code, _headers = get_sections_for_teacher_with_http_info(id, opts)
1981
+ data
1982
+ end
1983
+
1984
+ # Returns the sections for a teacher
1985
+ # @param id
1986
+ # @param [Hash] opts the optional parameters
1987
+ # @option opts [Integer] :limit
1988
+ # @option opts [String] :starting_after
1989
+ # @option opts [String] :ending_before
1990
+ # @return [Array<(SectionsResponse, Integer, Hash)>] SectionsResponse data, response status code and response headers
1991
+ def get_sections_for_teacher_with_http_info(id, opts = {})
1992
+ if @api_client.config.debugging
1993
+ @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_teacher ...'
1994
+ end
1995
+ # verify the required parameter 'id' is set
1996
+ if @api_client.config.client_side_validation && id.nil?
1997
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_teacher"
1998
+ end
1999
+ # resource path
2000
+ local_var_path = '/teachers/{id}/sections'.sub('{' + 'id' + '}', id.to_s)
2001
+
2002
+ # query parameters
2003
+ query_params = opts[:query_params] || {}
2004
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2005
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2006
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2007
+
2008
+ # header parameters
2009
+ header_params = opts[:header_params] || {}
2010
+ # HTTP header 'Accept' (if needed)
2011
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2012
+
2013
+ # form parameters
2014
+ form_params = opts[:form_params] || {}
2015
+
2016
+ # http body (model)
2017
+ post_body = opts[:body]
2018
+
2019
+ return_type = opts[:return_type] || 'SectionsResponse'
2020
+
2021
+ auth_names = opts[:auth_names] || ['oauth']
2022
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2023
+ :header_params => header_params,
2024
+ :query_params => query_params,
2025
+ :form_params => form_params,
2026
+ :body => post_body,
2027
+ :auth_names => auth_names,
2028
+ :return_type => return_type)
2029
+
2030
+ if @api_client.config.debugging
2031
+ @api_client.config.logger.debug "API called: DataApi#get_sections_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2032
+ end
2033
+ return data, status_code, headers
2034
+ end
2035
+ # Returns the sections for a term
2036
+ # @param id
2037
+ # @param [Hash] opts the optional parameters
2038
+ # @option opts [Integer] :limit
2039
+ # @option opts [String] :starting_after
2040
+ # @option opts [String] :ending_before
2041
+ # @return [SectionsResponse]
2042
+ def get_sections_for_term(id, opts = {})
2043
+ data, _status_code, _headers = get_sections_for_term_with_http_info(id, opts)
2044
+ data
2045
+ end
2046
+
2047
+ # Returns the sections for a term
2048
+ # @param id
2049
+ # @param [Hash] opts the optional parameters
2050
+ # @option opts [Integer] :limit
2051
+ # @option opts [String] :starting_after
2052
+ # @option opts [String] :ending_before
2053
+ # @return [Array<(SectionsResponse, Integer, Hash)>] SectionsResponse data, response status code and response headers
2054
+ def get_sections_for_term_with_http_info(id, opts = {})
2055
+ if @api_client.config.debugging
2056
+ @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_term ...'
2057
+ end
2058
+ # verify the required parameter 'id' is set
2059
+ if @api_client.config.client_side_validation && id.nil?
2060
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_term"
2061
+ end
2062
+ # resource path
2063
+ local_var_path = '/terms/{id}/sections'.sub('{' + 'id' + '}', id.to_s)
2064
+
2065
+ # query parameters
2066
+ query_params = opts[:query_params] || {}
2067
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2068
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2069
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2070
+
2071
+ # header parameters
2072
+ header_params = opts[:header_params] || {}
2073
+ # HTTP header 'Accept' (if needed)
2074
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2075
+
2076
+ # form parameters
2077
+ form_params = opts[:form_params] || {}
2078
+
2079
+ # http body (model)
2080
+ post_body = opts[:body]
2081
+
2082
+ return_type = opts[:return_type] || 'SectionsResponse'
2083
+
2084
+ auth_names = opts[:auth_names] || ['oauth']
2085
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2086
+ :header_params => header_params,
2087
+ :query_params => query_params,
2088
+ :form_params => form_params,
2089
+ :body => post_body,
2090
+ :auth_names => auth_names,
2091
+ :return_type => return_type)
2092
+
2093
+ if @api_client.config.debugging
2094
+ @api_client.config.logger.debug "API called: DataApi#get_sections_for_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2095
+ end
2096
+ return data, status_code, headers
2097
+ end
2098
+ # Returns a specific student
2099
+ # @param id
2100
+ # @param [Hash] opts the optional parameters
2101
+ # @return [StudentResponse]
2102
+ def get_student(id, opts = {})
2103
+ data, _status_code, _headers = get_student_with_http_info(id, opts)
2104
+ data
2105
+ end
2106
+
2107
+ # Returns a specific student
2108
+ # @param id
2109
+ # @param [Hash] opts the optional parameters
2110
+ # @return [Array<(StudentResponse, Integer, Hash)>] StudentResponse data, response status code and response headers
2111
+ def get_student_with_http_info(id, opts = {})
2112
+ if @api_client.config.debugging
2113
+ @api_client.config.logger.debug 'Calling API: DataApi.get_student ...'
2114
+ end
2115
+ # verify the required parameter 'id' is set
2116
+ if @api_client.config.client_side_validation && id.nil?
2117
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_student"
2118
+ end
2119
+ # resource path
2120
+ local_var_path = '/students/{id}'.sub('{' + 'id' + '}', id.to_s)
2121
+
2122
+ # query parameters
2123
+ query_params = opts[:query_params] || {}
2124
+
2125
+ # header parameters
2126
+ header_params = opts[:header_params] || {}
2127
+ # HTTP header 'Accept' (if needed)
2128
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2129
+
2130
+ # form parameters
2131
+ form_params = opts[:form_params] || {}
2132
+
2133
+ # http body (model)
2134
+ post_body = opts[:body]
2135
+
2136
+ return_type = opts[:return_type] || 'StudentResponse'
2137
+
2138
+ auth_names = opts[:auth_names] || ['oauth']
2139
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2140
+ :header_params => header_params,
2141
+ :query_params => query_params,
2142
+ :form_params => form_params,
2143
+ :body => post_body,
2144
+ :auth_names => auth_names,
2145
+ :return_type => return_type)
2146
+
2147
+ if @api_client.config.debugging
2148
+ @api_client.config.logger.debug "API called: DataApi#get_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2149
+ end
2150
+ return data, status_code, headers
2151
+ end
2152
+ # Returns a list of students
2153
+ # @param [Hash] opts the optional parameters
2154
+ # @option opts [Integer] :limit
2155
+ # @option opts [String] :starting_after
2156
+ # @option opts [String] :ending_before
2157
+ # @option opts [String] :count
2158
+ # @return [StudentsResponse]
2159
+ def get_students(opts = {})
2160
+ data, _status_code, _headers = get_students_with_http_info(opts)
2161
+ data
2162
+ end
2163
+
2164
+ # Returns a list of students
2165
+ # @param [Hash] opts the optional parameters
2166
+ # @option opts [Integer] :limit
2167
+ # @option opts [String] :starting_after
2168
+ # @option opts [String] :ending_before
2169
+ # @option opts [String] :count
2170
+ # @return [Array<(StudentsResponse, Integer, Hash)>] StudentsResponse data, response status code and response headers
2171
+ def get_students_with_http_info(opts = {})
2172
+ if @api_client.config.debugging
2173
+ @api_client.config.logger.debug 'Calling API: DataApi.get_students ...'
2174
+ end
2175
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
2176
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
2177
+ end
2178
+ # resource path
2179
+ local_var_path = '/students'
2180
+
2181
+ # query parameters
2182
+ query_params = opts[:query_params] || {}
2183
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2184
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2185
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2186
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
2187
+
2188
+ # header parameters
2189
+ header_params = opts[:header_params] || {}
2190
+ # HTTP header 'Accept' (if needed)
2191
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2192
+
2193
+ # form parameters
2194
+ form_params = opts[:form_params] || {}
2195
+
2196
+ # http body (model)
2197
+ post_body = opts[:body]
2198
+
2199
+ return_type = opts[:return_type] || 'StudentsResponse'
2200
+
2201
+ auth_names = opts[:auth_names] || ['oauth']
2202
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2203
+ :header_params => header_params,
2204
+ :query_params => query_params,
2205
+ :form_params => form_params,
2206
+ :body => post_body,
2207
+ :auth_names => auth_names,
2208
+ :return_type => return_type)
2209
+
2210
+ if @api_client.config.debugging
2211
+ @api_client.config.logger.debug "API called: DataApi#get_students\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2212
+ end
2213
+ return data, status_code, headers
2214
+ end
2215
+ # Returns the students for a student contact
2216
+ # @param id
2217
+ # @param [Hash] opts the optional parameters
2218
+ # @option opts [Integer] :limit
2219
+ # @option opts [String] :starting_after
2220
+ # @option opts [String] :ending_before
2221
+ # @return [StudentsResponse]
2222
+ def get_students_for_contact(id, opts = {})
2223
+ data, _status_code, _headers = get_students_for_contact_with_http_info(id, opts)
2224
+ data
2225
+ end
2226
+
2227
+ # Returns the students for a student contact
2228
+ # @param id
2229
+ # @param [Hash] opts the optional parameters
2230
+ # @option opts [Integer] :limit
2231
+ # @option opts [String] :starting_after
2232
+ # @option opts [String] :ending_before
2233
+ # @return [Array<(StudentsResponse, Integer, Hash)>] StudentsResponse data, response status code and response headers
2234
+ def get_students_for_contact_with_http_info(id, opts = {})
2235
+ if @api_client.config.debugging
2236
+ @api_client.config.logger.debug 'Calling API: DataApi.get_students_for_contact ...'
2237
+ end
2238
+ # verify the required parameter 'id' is set
2239
+ if @api_client.config.client_side_validation && id.nil?
2240
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_students_for_contact"
2241
+ end
2242
+ # resource path
2243
+ local_var_path = '/contacts/{id}/students'.sub('{' + 'id' + '}', id.to_s)
2244
+
2245
+ # query parameters
2246
+ query_params = opts[:query_params] || {}
2247
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2248
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2249
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2250
+
2251
+ # header parameters
2252
+ header_params = opts[:header_params] || {}
2253
+ # HTTP header 'Accept' (if needed)
2254
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2255
+
2256
+ # form parameters
2257
+ form_params = opts[:form_params] || {}
2258
+
2259
+ # http body (model)
2260
+ post_body = opts[:body]
2261
+
2262
+ return_type = opts[:return_type] || 'StudentsResponse'
2263
+
2264
+ auth_names = opts[:auth_names] || ['oauth']
2265
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2266
+ :header_params => header_params,
2267
+ :query_params => query_params,
2268
+ :form_params => form_params,
2269
+ :body => post_body,
2270
+ :auth_names => auth_names,
2271
+ :return_type => return_type)
2272
+
2273
+ if @api_client.config.debugging
2274
+ @api_client.config.logger.debug "API called: DataApi#get_students_for_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2275
+ end
2276
+ return data, status_code, headers
2277
+ end
2278
+ # Returns the students for a school
2279
+ # @param id
2280
+ # @param [Hash] opts the optional parameters
2281
+ # @option opts [Integer] :limit
2282
+ # @option opts [String] :starting_after
2283
+ # @option opts [String] :ending_before
2284
+ # @return [StudentsResponse]
2285
+ def get_students_for_school(id, opts = {})
2286
+ data, _status_code, _headers = get_students_for_school_with_http_info(id, opts)
2287
+ data
2288
+ end
2289
+
2290
+ # Returns the students for a school
2291
+ # @param id
2292
+ # @param [Hash] opts the optional parameters
2293
+ # @option opts [Integer] :limit
2294
+ # @option opts [String] :starting_after
2295
+ # @option opts [String] :ending_before
2296
+ # @return [Array<(StudentsResponse, Integer, Hash)>] StudentsResponse data, response status code and response headers
2297
+ def get_students_for_school_with_http_info(id, opts = {})
2298
+ if @api_client.config.debugging
2299
+ @api_client.config.logger.debug 'Calling API: DataApi.get_students_for_school ...'
2300
+ end
2301
+ # verify the required parameter 'id' is set
2302
+ if @api_client.config.client_side_validation && id.nil?
2303
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_students_for_school"
2304
+ end
2305
+ # resource path
2306
+ local_var_path = '/schools/{id}/students'.sub('{' + 'id' + '}', id.to_s)
2307
+
2308
+ # query parameters
2309
+ query_params = opts[:query_params] || {}
2310
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2311
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2312
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2313
+
2314
+ # header parameters
2315
+ header_params = opts[:header_params] || {}
2316
+ # HTTP header 'Accept' (if needed)
2317
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2318
+
2319
+ # form parameters
2320
+ form_params = opts[:form_params] || {}
2321
+
2322
+ # http body (model)
2323
+ post_body = opts[:body]
2324
+
2325
+ return_type = opts[:return_type] || 'StudentsResponse'
2326
+
2327
+ auth_names = opts[:auth_names] || ['oauth']
2328
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2329
+ :header_params => header_params,
2330
+ :query_params => query_params,
2331
+ :form_params => form_params,
2332
+ :body => post_body,
2333
+ :auth_names => auth_names,
2334
+ :return_type => return_type)
2335
+
2336
+ if @api_client.config.debugging
2337
+ @api_client.config.logger.debug "API called: DataApi#get_students_for_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2338
+ end
2339
+ return data, status_code, headers
2340
+ end
2341
+ # Returns the students for a section
2342
+ # @param id
2343
+ # @param [Hash] opts the optional parameters
2344
+ # @option opts [Integer] :limit
2345
+ # @option opts [String] :starting_after
2346
+ # @option opts [String] :ending_before
2347
+ # @return [StudentsResponse]
2348
+ def get_students_for_section(id, opts = {})
2349
+ data, _status_code, _headers = get_students_for_section_with_http_info(id, opts)
2350
+ data
2351
+ end
2352
+
2353
+ # Returns the students for a section
2354
+ # @param id
2355
+ # @param [Hash] opts the optional parameters
2356
+ # @option opts [Integer] :limit
2357
+ # @option opts [String] :starting_after
2358
+ # @option opts [String] :ending_before
2359
+ # @return [Array<(StudentsResponse, Integer, Hash)>] StudentsResponse data, response status code and response headers
2360
+ def get_students_for_section_with_http_info(id, opts = {})
2361
+ if @api_client.config.debugging
2362
+ @api_client.config.logger.debug 'Calling API: DataApi.get_students_for_section ...'
2363
+ end
2364
+ # verify the required parameter 'id' is set
2365
+ if @api_client.config.client_side_validation && id.nil?
2366
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_students_for_section"
2367
+ end
2368
+ # resource path
2369
+ local_var_path = '/sections/{id}/students'.sub('{' + 'id' + '}', id.to_s)
2370
+
2371
+ # query parameters
2372
+ query_params = opts[:query_params] || {}
2373
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2374
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2375
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2376
+
2377
+ # header parameters
2378
+ header_params = opts[:header_params] || {}
2379
+ # HTTP header 'Accept' (if needed)
2380
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2381
+
2382
+ # form parameters
2383
+ form_params = opts[:form_params] || {}
2384
+
2385
+ # http body (model)
2386
+ post_body = opts[:body]
2387
+
2388
+ return_type = opts[:return_type] || 'StudentsResponse'
2389
+
2390
+ auth_names = opts[:auth_names] || ['oauth']
2391
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2392
+ :header_params => header_params,
2393
+ :query_params => query_params,
2394
+ :form_params => form_params,
2395
+ :body => post_body,
2396
+ :auth_names => auth_names,
2397
+ :return_type => return_type)
2398
+
2399
+ if @api_client.config.debugging
2400
+ @api_client.config.logger.debug "API called: DataApi#get_students_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2401
+ end
2402
+ return data, status_code, headers
2403
+ end
2404
+ # Returns the students for a teacher
2405
+ # @param id
2406
+ # @param [Hash] opts the optional parameters
2407
+ # @option opts [Integer] :limit
2408
+ # @option opts [String] :starting_after
2409
+ # @option opts [String] :ending_before
2410
+ # @return [StudentsResponse]
2411
+ def get_students_for_teacher(id, opts = {})
2412
+ data, _status_code, _headers = get_students_for_teacher_with_http_info(id, opts)
2413
+ data
2414
+ end
2415
+
2416
+ # Returns the students for a teacher
2417
+ # @param id
2418
+ # @param [Hash] opts the optional parameters
2419
+ # @option opts [Integer] :limit
2420
+ # @option opts [String] :starting_after
2421
+ # @option opts [String] :ending_before
2422
+ # @return [Array<(StudentsResponse, Integer, Hash)>] StudentsResponse data, response status code and response headers
2423
+ def get_students_for_teacher_with_http_info(id, opts = {})
2424
+ if @api_client.config.debugging
2425
+ @api_client.config.logger.debug 'Calling API: DataApi.get_students_for_teacher ...'
2426
+ end
2427
+ # verify the required parameter 'id' is set
2428
+ if @api_client.config.client_side_validation && id.nil?
2429
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_students_for_teacher"
2430
+ end
2431
+ # resource path
2432
+ local_var_path = '/teachers/{id}/students'.sub('{' + 'id' + '}', id.to_s)
2433
+
2434
+ # query parameters
2435
+ query_params = opts[:query_params] || {}
2436
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2437
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2438
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2439
+
2440
+ # header parameters
2441
+ header_params = opts[:header_params] || {}
2442
+ # HTTP header 'Accept' (if needed)
2443
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2444
+
2445
+ # form parameters
2446
+ form_params = opts[:form_params] || {}
2447
+
2448
+ # http body (model)
2449
+ post_body = opts[:body]
2450
+
2451
+ return_type = opts[:return_type] || 'StudentsResponse'
2452
+
2453
+ auth_names = opts[:auth_names] || ['oauth']
2454
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2455
+ :header_params => header_params,
2456
+ :query_params => query_params,
2457
+ :form_params => form_params,
2458
+ :body => post_body,
2459
+ :auth_names => auth_names,
2460
+ :return_type => return_type)
2461
+
2462
+ if @api_client.config.debugging
2463
+ @api_client.config.logger.debug "API called: DataApi#get_students_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2464
+ end
2465
+ return data, status_code, headers
2466
+ end
2467
+ # Returns a specific teacher
2468
+ # @param id
2469
+ # @param [Hash] opts the optional parameters
2470
+ # @return [TeacherResponse]
2471
+ def get_teacher(id, opts = {})
2472
+ data, _status_code, _headers = get_teacher_with_http_info(id, opts)
2473
+ data
2474
+ end
2475
+
2476
+ # Returns a specific teacher
2477
+ # @param id
2478
+ # @param [Hash] opts the optional parameters
2479
+ # @return [Array<(TeacherResponse, Integer, Hash)>] TeacherResponse data, response status code and response headers
2480
+ def get_teacher_with_http_info(id, opts = {})
2481
+ if @api_client.config.debugging
2482
+ @api_client.config.logger.debug 'Calling API: DataApi.get_teacher ...'
2483
+ end
2484
+ # verify the required parameter 'id' is set
2485
+ if @api_client.config.client_side_validation && id.nil?
2486
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teacher"
2487
+ end
2488
+ # resource path
2489
+ local_var_path = '/teachers/{id}'.sub('{' + 'id' + '}', id.to_s)
2490
+
2491
+ # query parameters
2492
+ query_params = opts[:query_params] || {}
2493
+
2494
+ # header parameters
2495
+ header_params = opts[:header_params] || {}
2496
+ # HTTP header 'Accept' (if needed)
2497
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2498
+
2499
+ # form parameters
2500
+ form_params = opts[:form_params] || {}
2501
+
2502
+ # http body (model)
2503
+ post_body = opts[:body]
2504
+
2505
+ return_type = opts[:return_type] || 'TeacherResponse'
2506
+
2507
+ auth_names = opts[:auth_names] || ['oauth']
2508
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2509
+ :header_params => header_params,
2510
+ :query_params => query_params,
2511
+ :form_params => form_params,
2512
+ :body => post_body,
2513
+ :auth_names => auth_names,
2514
+ :return_type => return_type)
2515
+
2516
+ if @api_client.config.debugging
2517
+ @api_client.config.logger.debug "API called: DataApi#get_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2518
+ end
2519
+ return data, status_code, headers
2520
+ end
2521
+ # Returns the primary teacher for a section
2522
+ # @param id
2523
+ # @param [Hash] opts the optional parameters
2524
+ # @return [TeacherResponse]
2525
+ def get_teacher_for_section(id, opts = {})
2526
+ data, _status_code, _headers = get_teacher_for_section_with_http_info(id, opts)
2527
+ data
2528
+ end
2529
+
2530
+ # Returns the primary teacher for a section
2531
+ # @param id
2532
+ # @param [Hash] opts the optional parameters
2533
+ # @return [Array<(TeacherResponse, Integer, Hash)>] TeacherResponse data, response status code and response headers
2534
+ def get_teacher_for_section_with_http_info(id, opts = {})
2535
+ if @api_client.config.debugging
2536
+ @api_client.config.logger.debug 'Calling API: DataApi.get_teacher_for_section ...'
2537
+ end
2538
+ # verify the required parameter 'id' is set
2539
+ if @api_client.config.client_side_validation && id.nil?
2540
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teacher_for_section"
2541
+ end
2542
+ # resource path
2543
+ local_var_path = '/sections/{id}/teacher'.sub('{' + 'id' + '}', id.to_s)
2544
+
2545
+ # query parameters
2546
+ query_params = opts[:query_params] || {}
2547
+
2548
+ # header parameters
2549
+ header_params = opts[:header_params] || {}
2550
+ # HTTP header 'Accept' (if needed)
2551
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2552
+
2553
+ # form parameters
2554
+ form_params = opts[:form_params] || {}
2555
+
2556
+ # http body (model)
2557
+ post_body = opts[:body]
2558
+
2559
+ return_type = opts[:return_type] || 'TeacherResponse'
2560
+
2561
+ auth_names = opts[:auth_names] || ['oauth']
2562
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2563
+ :header_params => header_params,
2564
+ :query_params => query_params,
2565
+ :form_params => form_params,
2566
+ :body => post_body,
2567
+ :auth_names => auth_names,
2568
+ :return_type => return_type)
2569
+
2570
+ if @api_client.config.debugging
2571
+ @api_client.config.logger.debug "API called: DataApi#get_teacher_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2572
+ end
2573
+ return data, status_code, headers
2574
+ end
2575
+ # Returns a list of teachers
2576
+ # @param [Hash] opts the optional parameters
2577
+ # @option opts [Integer] :limit
2578
+ # @option opts [String] :starting_after
2579
+ # @option opts [String] :ending_before
2580
+ # @option opts [String] :count
2581
+ # @return [TeachersResponse]
2582
+ def get_teachers(opts = {})
2583
+ data, _status_code, _headers = get_teachers_with_http_info(opts)
2584
+ data
2585
+ end
2586
+
2587
+ # Returns a list of teachers
2588
+ # @param [Hash] opts the optional parameters
2589
+ # @option opts [Integer] :limit
2590
+ # @option opts [String] :starting_after
2591
+ # @option opts [String] :ending_before
2592
+ # @option opts [String] :count
2593
+ # @return [Array<(TeachersResponse, Integer, Hash)>] TeachersResponse data, response status code and response headers
2594
+ def get_teachers_with_http_info(opts = {})
2595
+ if @api_client.config.debugging
2596
+ @api_client.config.logger.debug 'Calling API: DataApi.get_teachers ...'
2597
+ end
2598
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
2599
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
2600
+ end
2601
+ # resource path
2602
+ local_var_path = '/teachers'
2603
+
2604
+ # query parameters
2605
+ query_params = opts[:query_params] || {}
2606
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2607
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2608
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2609
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
2610
+
2611
+ # header parameters
2612
+ header_params = opts[:header_params] || {}
2613
+ # HTTP header 'Accept' (if needed)
2614
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2615
+
2616
+ # form parameters
2617
+ form_params = opts[:form_params] || {}
2618
+
2619
+ # http body (model)
2620
+ post_body = opts[:body]
2621
+
2622
+ return_type = opts[:return_type] || 'TeachersResponse'
2623
+
2624
+ auth_names = opts[:auth_names] || ['oauth']
2625
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2626
+ :header_params => header_params,
2627
+ :query_params => query_params,
2628
+ :form_params => form_params,
2629
+ :body => post_body,
2630
+ :auth_names => auth_names,
2631
+ :return_type => return_type)
2632
+
2633
+ if @api_client.config.debugging
2634
+ @api_client.config.logger.debug "API called: DataApi#get_teachers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2635
+ end
2636
+ return data, status_code, headers
2637
+ end
2638
+ # Returns the teachers for a school
2639
+ # @param id
2640
+ # @param [Hash] opts the optional parameters
2641
+ # @option opts [Integer] :limit
2642
+ # @option opts [String] :starting_after
2643
+ # @option opts [String] :ending_before
2644
+ # @return [TeachersResponse]
2645
+ def get_teachers_for_school(id, opts = {})
2646
+ data, _status_code, _headers = get_teachers_for_school_with_http_info(id, opts)
2647
+ data
2648
+ end
2649
+
2650
+ # Returns the teachers for a school
2651
+ # @param id
2652
+ # @param [Hash] opts the optional parameters
2653
+ # @option opts [Integer] :limit
2654
+ # @option opts [String] :starting_after
2655
+ # @option opts [String] :ending_before
2656
+ # @return [Array<(TeachersResponse, Integer, Hash)>] TeachersResponse data, response status code and response headers
2657
+ def get_teachers_for_school_with_http_info(id, opts = {})
2658
+ if @api_client.config.debugging
2659
+ @api_client.config.logger.debug 'Calling API: DataApi.get_teachers_for_school ...'
2660
+ end
2661
+ # verify the required parameter 'id' is set
2662
+ if @api_client.config.client_side_validation && id.nil?
2663
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teachers_for_school"
2664
+ end
2665
+ # resource path
2666
+ local_var_path = '/schools/{id}/teachers'.sub('{' + 'id' + '}', id.to_s)
2667
+
2668
+ # query parameters
2669
+ query_params = opts[:query_params] || {}
2670
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2671
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2672
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2673
+
2674
+ # header parameters
2675
+ header_params = opts[:header_params] || {}
2676
+ # HTTP header 'Accept' (if needed)
2677
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2678
+
2679
+ # form parameters
2680
+ form_params = opts[:form_params] || {}
2681
+
2682
+ # http body (model)
2683
+ post_body = opts[:body]
2684
+
2685
+ return_type = opts[:return_type] || 'TeachersResponse'
2686
+
2687
+ auth_names = opts[:auth_names] || ['oauth']
2688
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2689
+ :header_params => header_params,
2690
+ :query_params => query_params,
2691
+ :form_params => form_params,
2692
+ :body => post_body,
2693
+ :auth_names => auth_names,
2694
+ :return_type => return_type)
2695
+
2696
+ if @api_client.config.debugging
2697
+ @api_client.config.logger.debug "API called: DataApi#get_teachers_for_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2698
+ end
2699
+ return data, status_code, headers
2700
+ end
2701
+ # Returns the teachers for a section
2702
+ # @param id
2703
+ # @param [Hash] opts the optional parameters
2704
+ # @option opts [Integer] :limit
2705
+ # @option opts [String] :starting_after
2706
+ # @option opts [String] :ending_before
2707
+ # @return [TeachersResponse]
2708
+ def get_teachers_for_section(id, opts = {})
2709
+ data, _status_code, _headers = get_teachers_for_section_with_http_info(id, opts)
2710
+ data
2711
+ end
2712
+
2713
+ # Returns the teachers for a section
2714
+ # @param id
2715
+ # @param [Hash] opts the optional parameters
2716
+ # @option opts [Integer] :limit
2717
+ # @option opts [String] :starting_after
2718
+ # @option opts [String] :ending_before
2719
+ # @return [Array<(TeachersResponse, Integer, Hash)>] TeachersResponse data, response status code and response headers
2720
+ def get_teachers_for_section_with_http_info(id, opts = {})
2721
+ if @api_client.config.debugging
2722
+ @api_client.config.logger.debug 'Calling API: DataApi.get_teachers_for_section ...'
2723
+ end
2724
+ # verify the required parameter 'id' is set
2725
+ if @api_client.config.client_side_validation && id.nil?
2726
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teachers_for_section"
2727
+ end
2728
+ # resource path
2729
+ local_var_path = '/sections/{id}/teachers'.sub('{' + 'id' + '}', id.to_s)
2730
+
2731
+ # query parameters
2732
+ query_params = opts[:query_params] || {}
2733
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2734
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2735
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2736
+
2737
+ # header parameters
2738
+ header_params = opts[:header_params] || {}
2739
+ # HTTP header 'Accept' (if needed)
2740
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2741
+
2742
+ # form parameters
2743
+ form_params = opts[:form_params] || {}
2744
+
2745
+ # http body (model)
2746
+ post_body = opts[:body]
2747
+
2748
+ return_type = opts[:return_type] || 'TeachersResponse'
2749
+
2750
+ auth_names = opts[:auth_names] || ['oauth']
2751
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2752
+ :header_params => header_params,
2753
+ :query_params => query_params,
2754
+ :form_params => form_params,
2755
+ :body => post_body,
2756
+ :auth_names => auth_names,
2757
+ :return_type => return_type)
2758
+
2759
+ if @api_client.config.debugging
2760
+ @api_client.config.logger.debug "API called: DataApi#get_teachers_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2761
+ end
2762
+ return data, status_code, headers
2763
+ end
2764
+ # Returns the teachers for a student
2765
+ # @param id
2766
+ # @param [Hash] opts the optional parameters
2767
+ # @option opts [Integer] :limit
2768
+ # @option opts [String] :starting_after
2769
+ # @option opts [String] :ending_before
2770
+ # @return [TeachersResponse]
2771
+ def get_teachers_for_student(id, opts = {})
2772
+ data, _status_code, _headers = get_teachers_for_student_with_http_info(id, opts)
2773
+ data
2774
+ end
2775
+
2776
+ # Returns the teachers for a student
2777
+ # @param id
2778
+ # @param [Hash] opts the optional parameters
2779
+ # @option opts [Integer] :limit
2780
+ # @option opts [String] :starting_after
2781
+ # @option opts [String] :ending_before
2782
+ # @return [Array<(TeachersResponse, Integer, Hash)>] TeachersResponse data, response status code and response headers
2783
+ def get_teachers_for_student_with_http_info(id, opts = {})
2784
+ if @api_client.config.debugging
2785
+ @api_client.config.logger.debug 'Calling API: DataApi.get_teachers_for_student ...'
2786
+ end
2787
+ # verify the required parameter 'id' is set
2788
+ if @api_client.config.client_side_validation && id.nil?
2789
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teachers_for_student"
2790
+ end
2791
+ # resource path
2792
+ local_var_path = '/students/{id}/teachers'.sub('{' + 'id' + '}', id.to_s)
2793
+
2794
+ # query parameters
2795
+ query_params = opts[:query_params] || {}
2796
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2797
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2798
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2799
+
2800
+ # header parameters
2801
+ header_params = opts[:header_params] || {}
2802
+ # HTTP header 'Accept' (if needed)
2803
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2804
+
2805
+ # form parameters
2806
+ form_params = opts[:form_params] || {}
2807
+
2808
+ # http body (model)
2809
+ post_body = opts[:body]
2810
+
2811
+ return_type = opts[:return_type] || 'TeachersResponse'
2812
+
2813
+ auth_names = opts[:auth_names] || ['oauth']
2814
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2815
+ :header_params => header_params,
2816
+ :query_params => query_params,
2817
+ :form_params => form_params,
2818
+ :body => post_body,
2819
+ :auth_names => auth_names,
2820
+ :return_type => return_type)
2821
+
2822
+ if @api_client.config.debugging
2823
+ @api_client.config.logger.debug "API called: DataApi#get_teachers_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2824
+ end
2825
+ return data, status_code, headers
2826
+ end
2827
+ # Returns a specific term
2828
+ # @param id
2829
+ # @param [Hash] opts the optional parameters
2830
+ # @return [TermResponse]
2831
+ def get_term(id, opts = {})
2832
+ data, _status_code, _headers = get_term_with_http_info(id, opts)
2833
+ data
2834
+ end
2835
+
2836
+ # Returns a specific term
2837
+ # @param id
2838
+ # @param [Hash] opts the optional parameters
2839
+ # @return [Array<(TermResponse, Integer, Hash)>] TermResponse data, response status code and response headers
2840
+ def get_term_with_http_info(id, opts = {})
2841
+ if @api_client.config.debugging
2842
+ @api_client.config.logger.debug 'Calling API: DataApi.get_term ...'
2843
+ end
2844
+ # verify the required parameter 'id' is set
2845
+ if @api_client.config.client_side_validation && id.nil?
2846
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_term"
2847
+ end
2848
+ # resource path
2849
+ local_var_path = '/terms/{id}'.sub('{' + 'id' + '}', id.to_s)
2850
+
2851
+ # query parameters
2852
+ query_params = opts[:query_params] || {}
2853
+
2854
+ # header parameters
2855
+ header_params = opts[:header_params] || {}
2856
+ # HTTP header 'Accept' (if needed)
2857
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2858
+
2859
+ # form parameters
2860
+ form_params = opts[:form_params] || {}
2861
+
2862
+ # http body (model)
2863
+ post_body = opts[:body]
2864
+
2865
+ return_type = opts[:return_type] || 'TermResponse'
2866
+
2867
+ auth_names = opts[:auth_names] || ['oauth']
2868
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2869
+ :header_params => header_params,
2870
+ :query_params => query_params,
2871
+ :form_params => form_params,
2872
+ :body => post_body,
2873
+ :auth_names => auth_names,
2874
+ :return_type => return_type)
2875
+
2876
+ if @api_client.config.debugging
2877
+ @api_client.config.logger.debug "API called: DataApi#get_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2878
+ end
2879
+ return data, status_code, headers
2880
+ end
2881
+ # Returns the term for a section
2882
+ # @param id
2883
+ # @param [Hash] opts the optional parameters
2884
+ # @return [TermResponse]
2885
+ def get_term_for_section(id, opts = {})
2886
+ data, _status_code, _headers = get_term_for_section_with_http_info(id, opts)
2887
+ data
2888
+ end
2889
+
2890
+ # Returns the term for a section
2891
+ # @param id
2892
+ # @param [Hash] opts the optional parameters
2893
+ # @return [Array<(TermResponse, Integer, Hash)>] TermResponse data, response status code and response headers
2894
+ def get_term_for_section_with_http_info(id, opts = {})
2895
+ if @api_client.config.debugging
2896
+ @api_client.config.logger.debug 'Calling API: DataApi.get_term_for_section ...'
2897
+ end
2898
+ # verify the required parameter 'id' is set
2899
+ if @api_client.config.client_side_validation && id.nil?
2900
+ fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_term_for_section"
2901
+ end
2902
+ # resource path
2903
+ local_var_path = '/sections/{id}/term'.sub('{' + 'id' + '}', id.to_s)
2904
+
2905
+ # query parameters
2906
+ query_params = opts[:query_params] || {}
2907
+
2908
+ # header parameters
2909
+ header_params = opts[:header_params] || {}
2910
+ # HTTP header 'Accept' (if needed)
2911
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2912
+
2913
+ # form parameters
2914
+ form_params = opts[:form_params] || {}
2915
+
2916
+ # http body (model)
2917
+ post_body = opts[:body]
2918
+
2919
+ return_type = opts[:return_type] || 'TermResponse'
2920
+
2921
+ auth_names = opts[:auth_names] || ['oauth']
2922
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2923
+ :header_params => header_params,
2924
+ :query_params => query_params,
2925
+ :form_params => form_params,
2926
+ :body => post_body,
2927
+ :auth_names => auth_names,
2928
+ :return_type => return_type)
2929
+
2930
+ if @api_client.config.debugging
2931
+ @api_client.config.logger.debug "API called: DataApi#get_term_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2932
+ end
2933
+ return data, status_code, headers
2934
+ end
2935
+ # Returns a list of terms
2936
+ # @param [Hash] opts the optional parameters
2937
+ # @option opts [Integer] :limit
2938
+ # @option opts [String] :starting_after
2939
+ # @option opts [String] :ending_before
2940
+ # @option opts [String] :count
2941
+ # @return [TermsResponse]
2942
+ def get_terms(opts = {})
2943
+ data, _status_code, _headers = get_terms_with_http_info(opts)
2944
+ data
2945
+ end
2946
+
2947
+ # Returns a list of terms
2948
+ # @param [Hash] opts the optional parameters
2949
+ # @option opts [Integer] :limit
2950
+ # @option opts [String] :starting_after
2951
+ # @option opts [String] :ending_before
2952
+ # @option opts [String] :count
2953
+ # @return [Array<(TermsResponse, Integer, Hash)>] TermsResponse data, response status code and response headers
2954
+ def get_terms_with_http_info(opts = {})
2955
+ if @api_client.config.debugging
2956
+ @api_client.config.logger.debug 'Calling API: DataApi.get_terms ...'
2957
+ end
2958
+ if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
2959
+ fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
2960
+ end
2961
+ # resource path
2962
+ local_var_path = '/terms'
2963
+
2964
+ # query parameters
2965
+ query_params = opts[:query_params] || {}
2966
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2967
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
2968
+ query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
2969
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
2970
+
2971
+ # header parameters
2972
+ header_params = opts[:header_params] || {}
2973
+ # HTTP header 'Accept' (if needed)
2974
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2975
+
2976
+ # form parameters
2977
+ form_params = opts[:form_params] || {}
2978
+
2979
+ # http body (model)
2980
+ post_body = opts[:body]
2981
+
2982
+ return_type = opts[:return_type] || 'TermsResponse'
2983
+
2984
+ auth_names = opts[:auth_names] || ['oauth']
2985
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2986
+ :header_params => header_params,
2987
+ :query_params => query_params,
2988
+ :form_params => form_params,
2989
+ :body => post_body,
2990
+ :auth_names => auth_names,
2991
+ :return_type => return_type)
2992
+
2993
+ if @api_client.config.debugging
2994
+ @api_client.config.logger.debug "API called: DataApi#get_terms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2995
+ end
2996
+ return data, status_code, headers
2997
+ end
2998
+ end
2999
+ end