commonlit-clever-ruby 2.1.1

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