flat_api 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (333) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile +7 -0
  4. data/README.md +248 -0
  5. data/Rakefile +8 -0
  6. data/docs/AccountApi.md +55 -0
  7. data/docs/Assignment.md +18 -0
  8. data/docs/AssignmentCopy.md +8 -0
  9. data/docs/AssignmentCreation.md +12 -0
  10. data/docs/AssignmentSubmission.md +19 -0
  11. data/docs/AssignmentSubmissionUpdate.md +11 -0
  12. data/docs/ClassApi.md +1051 -0
  13. data/docs/ClassAttachmentCreation.md +10 -0
  14. data/docs/ClassCreation.md +9 -0
  15. data/docs/ClassDetails.md +25 -0
  16. data/docs/ClassDetailsCanvas.md +9 -0
  17. data/docs/ClassDetailsClever.md +14 -0
  18. data/docs/ClassDetailsGoogleClassroom.md +11 -0
  19. data/docs/ClassDetailsGoogleDrive.md +9 -0
  20. data/docs/ClassDetailsLti.md +10 -0
  21. data/docs/ClassRoles.md +7 -0
  22. data/docs/ClassState.md +7 -0
  23. data/docs/ClassUpdate.md +9 -0
  24. data/docs/FlatErrorResponse.md +11 -0
  25. data/docs/FlatLocales.md +7 -0
  26. data/docs/GoogleClassroomCoursework.md +10 -0
  27. data/docs/GoogleClassroomSubmission.md +10 -0
  28. data/docs/Group.md +14 -0
  29. data/docs/GroupApi.md +167 -0
  30. data/docs/GroupDetails.md +14 -0
  31. data/docs/GroupType.md +7 -0
  32. data/docs/LicenseMode.md +7 -0
  33. data/docs/LicenseSources.md +7 -0
  34. data/docs/LmsName.md +7 -0
  35. data/docs/LtiCredentials.md +16 -0
  36. data/docs/LtiCredentialsCreation.md +9 -0
  37. data/docs/MediaAttachment.md +23 -0
  38. data/docs/MediaScoreSharingMode.md +7 -0
  39. data/docs/OrganizationApi.md +538 -0
  40. data/docs/OrganizationInvitation.md +14 -0
  41. data/docs/OrganizationInvitationCreation.md +9 -0
  42. data/docs/OrganizationRoles.md +7 -0
  43. data/docs/ScoreApi.md +1605 -0
  44. data/docs/ScoreCollaborator.md +15 -0
  45. data/docs/ScoreCollaboratorCreation.md +13 -0
  46. data/docs/ScoreComment.md +22 -0
  47. data/docs/ScoreCommentContext.md +14 -0
  48. data/docs/ScoreCommentCreation.md +13 -0
  49. data/docs/ScoreCommentUpdate.md +11 -0
  50. data/docs/ScoreCommentsCounts.md +11 -0
  51. data/docs/ScoreCreation.md +13 -0
  52. data/docs/ScoreCreationType.md +7 -0
  53. data/docs/ScoreData.md +7 -0
  54. data/docs/ScoreDataEncoding.md +7 -0
  55. data/docs/ScoreDetails.md +36 -0
  56. data/docs/ScoreFork.md +7 -0
  57. data/docs/ScoreLicense.md +7 -0
  58. data/docs/ScoreLikesCounts.md +10 -0
  59. data/docs/ScoreModification.md +13 -0
  60. data/docs/ScorePrivacy.md +7 -0
  61. data/docs/ScoreRevision.md +14 -0
  62. data/docs/ScoreRevisionCreation.md +11 -0
  63. data/docs/ScoreRevisionStatistics.md +9 -0
  64. data/docs/ScoreRights.md +9 -0
  65. data/docs/ScoreSource.md +8 -0
  66. data/docs/ScoreSummary.md +13 -0
  67. data/docs/ScoreTrack.md +19 -0
  68. data/docs/ScoreTrackCreation.md +12 -0
  69. data/docs/ScoreTrackPoint.md +10 -0
  70. data/docs/ScoreTrackState.md +7 -0
  71. data/docs/ScoreTrackType.md +7 -0
  72. data/docs/ScoreTrackUpdate.md +11 -0
  73. data/docs/ScoreViewsCounts.md +10 -0
  74. data/docs/UserAdminUpdate.md +9 -0
  75. data/docs/UserApi.md +173 -0
  76. data/docs/UserBasics.md +13 -0
  77. data/docs/UserCreation.md +11 -0
  78. data/docs/UserDetails.md +28 -0
  79. data/docs/UserDetailsAdmin.md +20 -0
  80. data/docs/UserDetailsAdminLicense.md +12 -0
  81. data/docs/UserInstruments.md +7 -0
  82. data/docs/UserPublic.md +25 -0
  83. data/docs/UserPublicSummary.md +17 -0
  84. data/flat_api.gemspec +48 -0
  85. data/git_push.sh +55 -0
  86. data/lib/flat_api.rb +117 -0
  87. data/lib/flat_api/api/account_api.rb +72 -0
  88. data/lib/flat_api/api/class_api.rb +1148 -0
  89. data/lib/flat_api/api/group_api.rb +191 -0
  90. data/lib/flat_api/api/organization_api.rb +599 -0
  91. data/lib/flat_api/api/score_api.rb +1737 -0
  92. data/lib/flat_api/api/user_api.rb +194 -0
  93. data/lib/flat_api/api_client.rb +389 -0
  94. data/lib/flat_api/api_error.rb +38 -0
  95. data/lib/flat_api/configuration.rb +209 -0
  96. data/lib/flat_api/models/assignment.rb +323 -0
  97. data/lib/flat_api/models/assignment_copy.rb +194 -0
  98. data/lib/flat_api/models/assignment_creation.rb +230 -0
  99. data/lib/flat_api/models/assignment_submission.rb +299 -0
  100. data/lib/flat_api/models/assignment_submission_update.rb +220 -0
  101. data/lib/flat_api/models/class_attachment_creation.rb +242 -0
  102. data/lib/flat_api/models/class_creation.rb +239 -0
  103. data/lib/flat_api/models/class_details.rb +351 -0
  104. data/lib/flat_api/models/class_details_canvas.rb +199 -0
  105. data/lib/flat_api/models/class_details_clever.rb +282 -0
  106. data/lib/flat_api/models/class_details_google_classroom.rb +219 -0
  107. data/lib/flat_api/models/class_details_google_drive.rb +199 -0
  108. data/lib/flat_api/models/class_details_lti.rb +209 -0
  109. data/lib/flat_api/models/class_roles.rb +22 -0
  110. data/lib/flat_api/models/class_state.rb +23 -0
  111. data/lib/flat_api/models/class_update.rb +231 -0
  112. data/lib/flat_api/models/flat_error_response.rb +219 -0
  113. data/lib/flat_api/models/flat_locales.rb +27 -0
  114. data/lib/flat_api/models/google_classroom_coursework.rb +209 -0
  115. data/lib/flat_api/models/google_classroom_submission.rb +209 -0
  116. data/lib/flat_api/models/group.rb +282 -0
  117. data/lib/flat_api/models/group_details.rb +248 -0
  118. data/lib/flat_api/models/group_type.rb +23 -0
  119. data/lib/flat_api/models/license_mode.rb +22 -0
  120. data/lib/flat_api/models/license_sources.rb +25 -0
  121. data/lib/flat_api/models/lms_name.rb +27 -0
  122. data/lib/flat_api/models/lti_credentials.rb +268 -0
  123. data/lib/flat_api/models/lti_credentials_creation.rb +227 -0
  124. data/lib/flat_api/models/media_attachment.rb +371 -0
  125. data/lib/flat_api/models/media_score_sharing_mode.rb +23 -0
  126. data/lib/flat_api/models/organization_invitation.rb +248 -0
  127. data/lib/flat_api/models/organization_invitation_creation.rb +198 -0
  128. data/lib/flat_api/models/organization_roles.rb +24 -0
  129. data/lib/flat_api/models/score_collaborator.rb +263 -0
  130. data/lib/flat_api/models/score_collaborator_creation.rb +245 -0
  131. data/lib/flat_api/models/score_comment.rb +363 -0
  132. data/lib/flat_api/models/score_comment_context.rb +282 -0
  133. data/lib/flat_api/models/score_comment_creation.rb +245 -0
  134. data/lib/flat_api/models/score_comment_update.rb +268 -0
  135. data/lib/flat_api/models/score_comments_counts.rb +219 -0
  136. data/lib/flat_api/models/score_creation.rb +240 -0
  137. data/lib/flat_api/models/score_creation_type.rb +23 -0
  138. data/lib/flat_api/models/score_data.rb +179 -0
  139. data/lib/flat_api/models/score_data_encoding.rb +21 -0
  140. data/lib/flat_api/models/score_details.rb +467 -0
  141. data/lib/flat_api/models/score_fork.rb +179 -0
  142. data/lib/flat_api/models/score_license.rb +28 -0
  143. data/lib/flat_api/models/score_likes_counts.rb +209 -0
  144. data/lib/flat_api/models/score_modification.rb +270 -0
  145. data/lib/flat_api/models/score_privacy.rb +24 -0
  146. data/lib/flat_api/models/score_revision.rb +249 -0
  147. data/lib/flat_api/models/score_revision_creation.rb +222 -0
  148. data/lib/flat_api/models/score_revision_statistics.rb +199 -0
  149. data/lib/flat_api/models/score_rights.rb +203 -0
  150. data/lib/flat_api/models/score_source.rb +189 -0
  151. data/lib/flat_api/models/score_summary.rb +237 -0
  152. data/lib/flat_api/models/score_track.rb +298 -0
  153. data/lib/flat_api/models/score_track_creation.rb +229 -0
  154. data/lib/flat_api/models/score_track_point.rb +252 -0
  155. data/lib/flat_api/models/score_track_state.rb +23 -0
  156. data/lib/flat_api/models/score_track_type.rb +24 -0
  157. data/lib/flat_api/models/score_track_update.rb +219 -0
  158. data/lib/flat_api/models/score_views_counts.rb +209 -0
  159. data/lib/flat_api/models/user_admin_update.rb +214 -0
  160. data/lib/flat_api/models/user_basics.rb +239 -0
  161. data/lib/flat_api/models/user_creation.rb +266 -0
  162. data/lib/flat_api/models/user_details.rb +418 -0
  163. data/lib/flat_api/models/user_details_admin.rb +306 -0
  164. data/lib/flat_api/models/user_details_admin_license.rb +227 -0
  165. data/lib/flat_api/models/user_instruments.rb +179 -0
  166. data/lib/flat_api/models/user_public.rb +356 -0
  167. data/lib/flat_api/models/user_public_summary.rb +277 -0
  168. data/lib/flat_api/version.rb +15 -0
  169. data/lib/swagger_client.rb +117 -0
  170. data/lib/swagger_client/api/account_api.rb +72 -0
  171. data/lib/swagger_client/api/class_api.rb +1148 -0
  172. data/lib/swagger_client/api/group_api.rb +191 -0
  173. data/lib/swagger_client/api/organization_api.rb +599 -0
  174. data/lib/swagger_client/api/score_api.rb +1737 -0
  175. data/lib/swagger_client/api/user_api.rb +194 -0
  176. data/lib/swagger_client/api_client.rb +389 -0
  177. data/lib/swagger_client/api_error.rb +38 -0
  178. data/lib/swagger_client/configuration.rb +209 -0
  179. data/lib/swagger_client/models/assignment.rb +323 -0
  180. data/lib/swagger_client/models/assignment_copy.rb +194 -0
  181. data/lib/swagger_client/models/assignment_creation.rb +230 -0
  182. data/lib/swagger_client/models/assignment_submission.rb +299 -0
  183. data/lib/swagger_client/models/assignment_submission_update.rb +220 -0
  184. data/lib/swagger_client/models/class_attachment_creation.rb +242 -0
  185. data/lib/swagger_client/models/class_creation.rb +239 -0
  186. data/lib/swagger_client/models/class_details.rb +351 -0
  187. data/lib/swagger_client/models/class_details_canvas.rb +199 -0
  188. data/lib/swagger_client/models/class_details_clever.rb +282 -0
  189. data/lib/swagger_client/models/class_details_google_classroom.rb +219 -0
  190. data/lib/swagger_client/models/class_details_google_drive.rb +199 -0
  191. data/lib/swagger_client/models/class_details_lti.rb +209 -0
  192. data/lib/swagger_client/models/class_roles.rb +22 -0
  193. data/lib/swagger_client/models/class_state.rb +23 -0
  194. data/lib/swagger_client/models/class_update.rb +231 -0
  195. data/lib/swagger_client/models/flat_error_response.rb +219 -0
  196. data/lib/swagger_client/models/flat_locales.rb +27 -0
  197. data/lib/swagger_client/models/google_classroom_coursework.rb +209 -0
  198. data/lib/swagger_client/models/google_classroom_submission.rb +209 -0
  199. data/lib/swagger_client/models/group.rb +282 -0
  200. data/lib/swagger_client/models/group_details.rb +248 -0
  201. data/lib/swagger_client/models/group_type.rb +23 -0
  202. data/lib/swagger_client/models/license_mode.rb +22 -0
  203. data/lib/swagger_client/models/license_sources.rb +25 -0
  204. data/lib/swagger_client/models/lms_name.rb +27 -0
  205. data/lib/swagger_client/models/lti_credentials.rb +268 -0
  206. data/lib/swagger_client/models/lti_credentials_creation.rb +227 -0
  207. data/lib/swagger_client/models/media_attachment.rb +371 -0
  208. data/lib/swagger_client/models/media_score_sharing_mode.rb +23 -0
  209. data/lib/swagger_client/models/organization_invitation.rb +248 -0
  210. data/lib/swagger_client/models/organization_invitation_creation.rb +198 -0
  211. data/lib/swagger_client/models/organization_roles.rb +24 -0
  212. data/lib/swagger_client/models/score_collaborator.rb +263 -0
  213. data/lib/swagger_client/models/score_collaborator_creation.rb +245 -0
  214. data/lib/swagger_client/models/score_comment.rb +363 -0
  215. data/lib/swagger_client/models/score_comment_context.rb +282 -0
  216. data/lib/swagger_client/models/score_comment_creation.rb +245 -0
  217. data/lib/swagger_client/models/score_comment_update.rb +268 -0
  218. data/lib/swagger_client/models/score_comments_counts.rb +219 -0
  219. data/lib/swagger_client/models/score_creation.rb +240 -0
  220. data/lib/swagger_client/models/score_creation_type.rb +23 -0
  221. data/lib/swagger_client/models/score_data.rb +179 -0
  222. data/lib/swagger_client/models/score_data_encoding.rb +21 -0
  223. data/lib/swagger_client/models/score_details.rb +467 -0
  224. data/lib/swagger_client/models/score_fork.rb +179 -0
  225. data/lib/swagger_client/models/score_license.rb +28 -0
  226. data/lib/swagger_client/models/score_likes_counts.rb +209 -0
  227. data/lib/swagger_client/models/score_modification.rb +270 -0
  228. data/lib/swagger_client/models/score_privacy.rb +24 -0
  229. data/lib/swagger_client/models/score_revision.rb +249 -0
  230. data/lib/swagger_client/models/score_revision_creation.rb +222 -0
  231. data/lib/swagger_client/models/score_revision_statistics.rb +199 -0
  232. data/lib/swagger_client/models/score_rights.rb +203 -0
  233. data/lib/swagger_client/models/score_source.rb +189 -0
  234. data/lib/swagger_client/models/score_summary.rb +237 -0
  235. data/lib/swagger_client/models/score_track.rb +298 -0
  236. data/lib/swagger_client/models/score_track_creation.rb +229 -0
  237. data/lib/swagger_client/models/score_track_point.rb +252 -0
  238. data/lib/swagger_client/models/score_track_state.rb +23 -0
  239. data/lib/swagger_client/models/score_track_type.rb +24 -0
  240. data/lib/swagger_client/models/score_track_update.rb +219 -0
  241. data/lib/swagger_client/models/score_views_counts.rb +209 -0
  242. data/lib/swagger_client/models/user_admin_update.rb +214 -0
  243. data/lib/swagger_client/models/user_basics.rb +239 -0
  244. data/lib/swagger_client/models/user_creation.rb +266 -0
  245. data/lib/swagger_client/models/user_details.rb +418 -0
  246. data/lib/swagger_client/models/user_details_admin.rb +306 -0
  247. data/lib/swagger_client/models/user_details_admin_license.rb +227 -0
  248. data/lib/swagger_client/models/user_instruments.rb +179 -0
  249. data/lib/swagger_client/models/user_public.rb +356 -0
  250. data/lib/swagger_client/models/user_public_summary.rb +277 -0
  251. data/lib/swagger_client/version.rb +15 -0
  252. data/spec/api/account_api_spec.rb +46 -0
  253. data/spec/api/class_api_spec.rb +278 -0
  254. data/spec/api/group_api_spec.rb +72 -0
  255. data/spec/api/organization_api_spec.rb +162 -0
  256. data/spec/api/score_api_spec.rb +411 -0
  257. data/spec/api/user_api_spec.rb +73 -0
  258. data/spec/api_client_spec.rb +226 -0
  259. data/spec/configuration_spec.rb +42 -0
  260. data/spec/models/assignment_copy_spec.rb +42 -0
  261. data/spec/models/assignment_creation_spec.rb +66 -0
  262. data/spec/models/assignment_spec.rb +106 -0
  263. data/spec/models/assignment_submission_spec.rb +108 -0
  264. data/spec/models/assignment_submission_update_spec.rb +60 -0
  265. data/spec/models/class_attachment_creation_spec.rb +58 -0
  266. data/spec/models/class_creation_spec.rb +48 -0
  267. data/spec/models/class_details_canvas_spec.rb +48 -0
  268. data/spec/models/class_details_clever_spec.rb +82 -0
  269. data/spec/models/class_details_google_classroom_spec.rb +60 -0
  270. data/spec/models/class_details_google_drive_spec.rb +48 -0
  271. data/spec/models/class_details_lti_spec.rb +54 -0
  272. data/spec/models/class_details_spec.rb +144 -0
  273. data/spec/models/class_roles_spec.rb +36 -0
  274. data/spec/models/class_state_spec.rb +36 -0
  275. data/spec/models/class_update_spec.rb +48 -0
  276. data/spec/models/flat_error_response_spec.rb +60 -0
  277. data/spec/models/flat_locales_spec.rb +36 -0
  278. data/spec/models/google_classroom_coursework_spec.rb +54 -0
  279. data/spec/models/google_classroom_submission_spec.rb +54 -0
  280. data/spec/models/group_details_spec.rb +78 -0
  281. data/spec/models/group_spec.rb +82 -0
  282. data/spec/models/group_type_spec.rb +36 -0
  283. data/spec/models/license_mode_spec.rb +36 -0
  284. data/spec/models/license_sources_spec.rb +36 -0
  285. data/spec/models/lms_name_spec.rb +36 -0
  286. data/spec/models/lti_credentials_creation_spec.rb +48 -0
  287. data/spec/models/lti_credentials_spec.rb +90 -0
  288. data/spec/models/media_attachment_spec.rb +136 -0
  289. data/spec/models/media_score_sharing_mode_spec.rb +36 -0
  290. data/spec/models/organization_invitation_creation_spec.rb +48 -0
  291. data/spec/models/organization_invitation_spec.rb +78 -0
  292. data/spec/models/organization_roles_spec.rb +36 -0
  293. data/spec/models/score_collaborator_creation_spec.rb +72 -0
  294. data/spec/models/score_collaborator_spec.rb +84 -0
  295. data/spec/models/score_comment_context_spec.rb +78 -0
  296. data/spec/models/score_comment_creation_spec.rb +72 -0
  297. data/spec/models/score_comment_spec.rb +130 -0
  298. data/spec/models/score_comment_update_spec.rb +60 -0
  299. data/spec/models/score_comments_counts_spec.rb +60 -0
  300. data/spec/models/score_creation_spec.rb +72 -0
  301. data/spec/models/score_creation_type_spec.rb +36 -0
  302. data/spec/models/score_data_encoding_spec.rb +36 -0
  303. data/spec/models/score_data_spec.rb +36 -0
  304. data/spec/models/score_details_spec.rb +210 -0
  305. data/spec/models/score_fork_spec.rb +36 -0
  306. data/spec/models/score_license_spec.rb +36 -0
  307. data/spec/models/score_likes_counts_spec.rb +54 -0
  308. data/spec/models/score_modification_spec.rb +72 -0
  309. data/spec/models/score_privacy_spec.rb +36 -0
  310. data/spec/models/score_revision_creation_spec.rb +60 -0
  311. data/spec/models/score_revision_spec.rb +78 -0
  312. data/spec/models/score_revision_statistics_spec.rb +48 -0
  313. data/spec/models/score_rights_spec.rb +48 -0
  314. data/spec/models/score_source_spec.rb +42 -0
  315. data/spec/models/score_summary_spec.rb +72 -0
  316. data/spec/models/score_track_creation_spec.rb +66 -0
  317. data/spec/models/score_track_point_spec.rb +58 -0
  318. data/spec/models/score_track_spec.rb +108 -0
  319. data/spec/models/score_track_state_spec.rb +36 -0
  320. data/spec/models/score_track_type_spec.rb +36 -0
  321. data/spec/models/score_track_update_spec.rb +60 -0
  322. data/spec/models/score_views_counts_spec.rb +54 -0
  323. data/spec/models/user_admin_update_spec.rb +48 -0
  324. data/spec/models/user_basics_spec.rb +72 -0
  325. data/spec/models/user_creation_spec.rb +60 -0
  326. data/spec/models/user_details_admin_license_spec.rb +66 -0
  327. data/spec/models/user_details_admin_spec.rb +114 -0
  328. data/spec/models/user_details_spec.rb +166 -0
  329. data/spec/models/user_instruments_spec.rb +36 -0
  330. data/spec/models/user_public_spec.rb +144 -0
  331. data/spec/models/user_public_summary_spec.rb +96 -0
  332. data/spec/spec_helper.rb +111 -0
  333. metadata +640 -0
@@ -0,0 +1,13 @@
1
+ # FlatApi::UserBasics
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The user unique identifier | [optional]
7
+ **username** | **String** | The user name (unique for the organization) | [optional]
8
+ **name** | **String** | A displayable name for the user | [optional]
9
+ **printable_name** | **String** | The name that can be directly printed (name or username) | [optional]
10
+ **picture** | **String** | User pictue | [optional]
11
+ **is_power_user** | **BOOLEAN** | User license status. 'True' if user is an individual Power user | [optional]
12
+
13
+
@@ -0,0 +1,11 @@
1
+ # FlatApi::UserCreation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **username** | **String** | Username of the new account |
7
+ **email** | **String** | Email of the new account | [optional]
8
+ **password** | **String** | Password of the new account |
9
+ **locale** | [**FlatLocales**](FlatLocales.md) | | [optional]
10
+
11
+
@@ -0,0 +1,28 @@
1
+ # FlatApi::UserDetails
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | Identifier of the user | [optional]
7
+ **username** | **String** | The user name (unique for the organization) | [optional]
8
+ **name** | **String** | A displayable name for the user | [optional]
9
+ **printable_name** | **String** | The name that can be directly printed (name or username) | [optional]
10
+ **picture** | **String** | User pictue | [optional]
11
+ **is_power_user** | **BOOLEAN** | User license status. 'True' if user is an individual Power user | [optional]
12
+ **organization** | **String** | Organization ID (for Edu users only) | [optional]
13
+ **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional]
14
+ **class_role** | [**ClassRoles**](ClassRoles.md) | | [optional]
15
+ **html_url** | **String** | Link to user profile (for Indiv. users only) | [optional]
16
+ **bio** | **String** | User's biography | [optional]
17
+ **registration_date** | **DateTime** | Date the user signed up | [optional]
18
+ **liked_scores_count** | **Integer** | Number of the scores liked by the user | [optional]
19
+ **followers_count** | **Integer** | Number of followers the user have | [optional]
20
+ **following_count** | **Integer** | Number of people the user follow | [optional]
21
+ **owned_public_scores_count** | **Integer** | Number of public scores the user have | [optional]
22
+ **profile_theme** | **String** | Theme (background) for the profile | [optional]
23
+ **instruments** | [**UserInstruments**](UserInstruments.md) | | [optional]
24
+ **type** | **String** | The type of account | [optional]
25
+ **private_profile** | **BOOLEAN** | Tell either this user profile is private or not (individual accounts only) | [optional]
26
+ **locale** | [**FlatLocales**](FlatLocales.md) | | [optional]
27
+
28
+
@@ -0,0 +1,20 @@
1
+ # FlatApi::UserDetailsAdmin
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The user unique identifier | [optional]
7
+ **username** | **String** | The user name (unique for the organization) | [optional]
8
+ **name** | **String** | A displayable name for the user | [optional]
9
+ **printable_name** | **String** | The name that can be directly printed (name or username) | [optional]
10
+ **picture** | **String** | User pictue | [optional]
11
+ **is_power_user** | **BOOLEAN** | User license status. 'True' if user is an individual Power user | [optional]
12
+ **organization** | **String** | Organization ID (for Edu users only) | [optional]
13
+ **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional]
14
+ **class_role** | [**ClassRoles**](ClassRoles.md) | | [optional]
15
+ **html_url** | **String** | Link to user profile (for Indiv. users only) | [optional]
16
+ **email** | **String** | Email of the user | [optional]
17
+ **last_activity_date** | **DateTime** | Date of the last user activity | [optional]
18
+ **license** | [**UserDetailsAdminLicense**](UserDetailsAdminLicense.md) | | [optional]
19
+
20
+
@@ -0,0 +1,12 @@
1
+ # FlatApi::UserDetailsAdminLicense
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | ID of the current license | [optional]
7
+ **expiration_date** | **DateTime** | Date when the license expires | [optional]
8
+ **source** | [**LicenseSources**](LicenseSources.md) | | [optional]
9
+ **mode** | [**LicenseMode**](LicenseMode.md) | | [optional]
10
+ **active** | **BOOLEAN** | ID of the current license | [optional]
11
+
12
+
@@ -0,0 +1,7 @@
1
+ # FlatApi::UserInstruments
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,25 @@
1
+ # FlatApi::UserPublic
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The user unique identifier | [optional]
7
+ **username** | **String** | The user name (unique for the organization) | [optional]
8
+ **name** | **String** | A displayable name for the user | [optional]
9
+ **printable_name** | **String** | The name that can be directly printed (name or username) | [optional]
10
+ **picture** | **String** | User pictue | [optional]
11
+ **is_power_user** | **BOOLEAN** | User license status. 'True' if user is an individual Power user | [optional]
12
+ **organization** | **String** | Organization ID (for Edu users only) | [optional]
13
+ **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional]
14
+ **class_role** | [**ClassRoles**](ClassRoles.md) | | [optional]
15
+ **html_url** | **String** | Link to user profile (for Indiv. users only) | [optional]
16
+ **bio** | **String** | User's biography | [optional]
17
+ **registration_date** | **DateTime** | Date the user signed up | [optional]
18
+ **liked_scores_count** | **Integer** | Number of the scores liked by the user | [optional]
19
+ **followers_count** | **Integer** | Number of followers the user have | [optional]
20
+ **following_count** | **Integer** | Number of people the user follow | [optional]
21
+ **owned_public_scores_count** | **Integer** | Number of public scores the user have | [optional]
22
+ **profile_theme** | **String** | Theme (background) for the profile | [optional]
23
+ **instruments** | [**UserInstruments**](UserInstruments.md) | | [optional]
24
+
25
+
@@ -0,0 +1,17 @@
1
+ # FlatApi::UserPublicSummary
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The user unique identifier | [optional]
7
+ **username** | **String** | The user name (unique for the organization) | [optional]
8
+ **name** | **String** | A displayable name for the user | [optional]
9
+ **printable_name** | **String** | The name that can be directly printed (name or username) | [optional]
10
+ **picture** | **String** | User pictue | [optional]
11
+ **is_power_user** | **BOOLEAN** | User license status. 'True' if user is an individual Power user | [optional]
12
+ **organization** | **String** | Organization ID (for Edu users only) | [optional]
13
+ **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional]
14
+ **class_role** | [**ClassRoles**](ClassRoles.md) | | [optional]
15
+ **html_url** | **String** | Link to user profile (for Indiv. users only) | [optional]
16
+
17
+
@@ -0,0 +1,48 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ =begin
4
+ #Flat API
5
+
6
+ #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
7
+
8
+ OpenAPI spec version: 2.5.1
9
+ Contact: developers@flat.io
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.2.3-SNAPSHOT
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "flat_api/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "flat_api"
20
+ s.version = FlatApi::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Flat Team"]
23
+ s.email = ["developers@flat.io"]
24
+ s.homepage = "https://github.com/FlatIO/api-client-ruby"
25
+ s.summary = "Ruby Client for Flat REST API (https://flat.io)"
26
+ s.description = "The Flat API allows you to easily extend the abilities of the Flat Platform (https://flat.io), with a wide range of use cases including the following:
27
+ - Creating and importing new music scores using MusicXML or MIDI files
28
+ - Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI)
29
+ - Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments."
30
+ s.license = "Apache-2.0"
31
+ s.required_ruby_version = ">= 1.9"
32
+
33
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
34
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
35
+
36
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
37
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
38
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
39
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
40
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
41
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
42
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
43
+
44
+ s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
45
+ s.test_files = `find spec/*`.split("\n")
46
+ s.executables = []
47
+ s.require_paths = ["lib"]
48
+ end
@@ -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="FlatIO"
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="api-client-ruby"
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 crediential 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,117 @@
1
+ =begin
2
+ #Flat API
3
+
4
+ #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
+
6
+ OpenAPI spec version: 2.5.1
7
+ Contact: developers@flat.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'flat_api/api_client'
15
+ require 'flat_api/api_error'
16
+ require 'flat_api/version'
17
+ require 'flat_api/configuration'
18
+
19
+ # Models
20
+ require 'flat_api/models/assignment'
21
+ require 'flat_api/models/assignment_copy'
22
+ require 'flat_api/models/assignment_creation'
23
+ require 'flat_api/models/assignment_submission'
24
+ require 'flat_api/models/assignment_submission_update'
25
+ require 'flat_api/models/class_attachment_creation'
26
+ require 'flat_api/models/class_creation'
27
+ require 'flat_api/models/class_details'
28
+ require 'flat_api/models/class_details_canvas'
29
+ require 'flat_api/models/class_details_clever'
30
+ require 'flat_api/models/class_details_google_classroom'
31
+ require 'flat_api/models/class_details_google_drive'
32
+ require 'flat_api/models/class_details_lti'
33
+ require 'flat_api/models/class_roles'
34
+ require 'flat_api/models/class_state'
35
+ require 'flat_api/models/class_update'
36
+ require 'flat_api/models/flat_error_response'
37
+ require 'flat_api/models/flat_locales'
38
+ require 'flat_api/models/google_classroom_coursework'
39
+ require 'flat_api/models/google_classroom_submission'
40
+ require 'flat_api/models/group'
41
+ require 'flat_api/models/group_details'
42
+ require 'flat_api/models/group_type'
43
+ require 'flat_api/models/license_mode'
44
+ require 'flat_api/models/license_sources'
45
+ require 'flat_api/models/lms_name'
46
+ require 'flat_api/models/lti_credentials'
47
+ require 'flat_api/models/lti_credentials_creation'
48
+ require 'flat_api/models/media_attachment'
49
+ require 'flat_api/models/media_score_sharing_mode'
50
+ require 'flat_api/models/organization_invitation'
51
+ require 'flat_api/models/organization_invitation_creation'
52
+ require 'flat_api/models/organization_roles'
53
+ require 'flat_api/models/score_collaborator'
54
+ require 'flat_api/models/score_collaborator_creation'
55
+ require 'flat_api/models/score_comment'
56
+ require 'flat_api/models/score_comment_context'
57
+ require 'flat_api/models/score_comment_creation'
58
+ require 'flat_api/models/score_comment_update'
59
+ require 'flat_api/models/score_comments_counts'
60
+ require 'flat_api/models/score_creation'
61
+ require 'flat_api/models/score_creation_type'
62
+ require 'flat_api/models/score_data'
63
+ require 'flat_api/models/score_data_encoding'
64
+ require 'flat_api/models/score_fork'
65
+ require 'flat_api/models/score_license'
66
+ require 'flat_api/models/score_likes_counts'
67
+ require 'flat_api/models/score_modification'
68
+ require 'flat_api/models/score_privacy'
69
+ require 'flat_api/models/score_revision'
70
+ require 'flat_api/models/score_revision_creation'
71
+ require 'flat_api/models/score_revision_statistics'
72
+ require 'flat_api/models/score_rights'
73
+ require 'flat_api/models/score_source'
74
+ require 'flat_api/models/score_summary'
75
+ require 'flat_api/models/score_track'
76
+ require 'flat_api/models/score_track_creation'
77
+ require 'flat_api/models/score_track_point'
78
+ require 'flat_api/models/score_track_state'
79
+ require 'flat_api/models/score_track_type'
80
+ require 'flat_api/models/score_track_update'
81
+ require 'flat_api/models/score_views_counts'
82
+ require 'flat_api/models/user_admin_update'
83
+ require 'flat_api/models/user_basics'
84
+ require 'flat_api/models/user_creation'
85
+ require 'flat_api/models/user_details_admin_license'
86
+ require 'flat_api/models/user_instruments'
87
+ require 'flat_api/models/score_details'
88
+ require 'flat_api/models/user_public_summary'
89
+ require 'flat_api/models/user_details_admin'
90
+ require 'flat_api/models/user_public'
91
+ require 'flat_api/models/user_details'
92
+
93
+ # APIs
94
+ require 'flat_api/api/account_api'
95
+ require 'flat_api/api/class_api'
96
+ require 'flat_api/api/group_api'
97
+ require 'flat_api/api/organization_api'
98
+ require 'flat_api/api/score_api'
99
+ require 'flat_api/api/user_api'
100
+
101
+ module FlatApi
102
+ class << self
103
+ # Customize default settings for the SDK using block.
104
+ # FlatApi.configure do |config|
105
+ # config.username = "xxx"
106
+ # config.password = "xxx"
107
+ # end
108
+ # If no block given, return the default Configuration object.
109
+ def configure
110
+ if block_given?
111
+ yield(Configuration.default)
112
+ else
113
+ Configuration.default
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,72 @@
1
+ =begin
2
+ #Flat API
3
+
4
+ #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
+
6
+ OpenAPI spec version: 2.5.1
7
+ Contact: developers@flat.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module FlatApi
16
+ class AccountApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Get current user profile
24
+ # Get details about the current authenticated User.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [UserDetails]
27
+ def get_authenticated_user(opts = {})
28
+ data, _status_code, _headers = get_authenticated_user_with_http_info(opts)
29
+ return data
30
+ end
31
+
32
+ # Get current user profile
33
+ # Get details about the current authenticated User.
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(UserDetails, Fixnum, Hash)>] UserDetails data, response status code and response headers
36
+ def get_authenticated_user_with_http_info(opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug "Calling API: AccountApi.get_authenticated_user ..."
39
+ end
40
+ # resource path
41
+ local_var_path = "/me"
42
+
43
+ # query parameters
44
+ query_params = {}
45
+
46
+ # header parameters
47
+ header_params = {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+ # HTTP header 'Content-Type'
51
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
52
+
53
+ # form parameters
54
+ form_params = {}
55
+
56
+ # http body (model)
57
+ post_body = nil
58
+ auth_names = ['OAuth2']
59
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
60
+ :header_params => header_params,
61
+ :query_params => query_params,
62
+ :form_params => form_params,
63
+ :body => post_body,
64
+ :auth_names => auth_names,
65
+ :return_type => 'UserDetails')
66
+ if @api_client.config.debugging
67
+ @api_client.config.logger.debug "API called: AccountApi#get_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
68
+ end
69
+ return data, status_code, headers
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,1148 @@
1
+ =begin
2
+ #Flat API
3
+
4
+ #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
+
6
+ OpenAPI spec version: 2.5.1
7
+ Contact: developers@flat.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module FlatApi
16
+ class ClassApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Activate the class
24
+ # Mark the class as `active`. This is mainly used for classes synchronized from Clever that are initially with an `inactive` state and hidden in the UI.
25
+ # @param _class Unique identifier of the class
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [ClassDetails]
28
+ def activate_class(_class, opts = {})
29
+ data, _status_code, _headers = activate_class_with_http_info(_class, opts)
30
+ return data
31
+ end
32
+
33
+ # Activate the class
34
+ # Mark the class as &#x60;active&#x60;. This is mainly used for classes synchronized from Clever that are initially with an &#x60;inactive&#x60; state and hidden in the UI.
35
+ # @param _class Unique identifier of the class
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers
38
+ def activate_class_with_http_info(_class, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: ClassApi.activate_class ..."
41
+ end
42
+ # verify the required parameter '_class' is set
43
+ if @api_client.config.client_side_validation && _class.nil?
44
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.activate_class"
45
+ end
46
+ # resource path
47
+ local_var_path = "/classes/{class}/activate".sub('{' + 'class' + '}', _class.to_s)
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = nil
64
+ auth_names = ['OAuth2']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'ClassDetails')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: ClassApi#activate_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+
78
+ # Add a user to the class
79
+ # This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization.
80
+ # @param _class Unique identifier of the class
81
+ # @param user Unique identifier of the user
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [nil]
84
+ def add_class_user(_class, user, opts = {})
85
+ add_class_user_with_http_info(_class, user, opts)
86
+ return nil
87
+ end
88
+
89
+ # Add a user to the class
90
+ # This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization.
91
+ # @param _class Unique identifier of the class
92
+ # @param user Unique identifier of the user
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
95
+ def add_class_user_with_http_info(_class, user, opts = {})
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug "Calling API: ClassApi.add_class_user ..."
98
+ end
99
+ # verify the required parameter '_class' is set
100
+ if @api_client.config.client_side_validation && _class.nil?
101
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.add_class_user"
102
+ end
103
+ # verify the required parameter 'user' is set
104
+ if @api_client.config.client_side_validation && user.nil?
105
+ fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.add_class_user"
106
+ end
107
+ # resource path
108
+ local_var_path = "/classes/{class}/users/{user}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'user' + '}', user.to_s)
109
+
110
+ # query parameters
111
+ query_params = {}
112
+
113
+ # header parameters
114
+ header_params = {}
115
+ # HTTP header 'Accept' (if needed)
116
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
117
+ # HTTP header 'Content-Type'
118
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = {}
122
+
123
+ # http body (model)
124
+ post_body = nil
125
+ auth_names = ['OAuth2']
126
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
127
+ :header_params => header_params,
128
+ :query_params => query_params,
129
+ :form_params => form_params,
130
+ :body => post_body,
131
+ :auth_names => auth_names)
132
+ if @api_client.config.debugging
133
+ @api_client.config.logger.debug "API called: ClassApi#add_class_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
134
+ end
135
+ return data, status_code, headers
136
+ end
137
+
138
+ # Archive the class
139
+ # Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
140
+ # @param _class Unique identifier of the class
141
+ # @param [Hash] opts the optional parameters
142
+ # @return [ClassDetails]
143
+ def archive_class(_class, opts = {})
144
+ data, _status_code, _headers = archive_class_with_http_info(_class, opts)
145
+ return data
146
+ end
147
+
148
+ # Archive the class
149
+ # Mark the class as &#x60;archived&#x60;. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
150
+ # @param _class Unique identifier of the class
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers
153
+ def archive_class_with_http_info(_class, opts = {})
154
+ if @api_client.config.debugging
155
+ @api_client.config.logger.debug "Calling API: ClassApi.archive_class ..."
156
+ end
157
+ # verify the required parameter '_class' is set
158
+ if @api_client.config.client_side_validation && _class.nil?
159
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.archive_class"
160
+ end
161
+ # resource path
162
+ local_var_path = "/classes/{class}/archive".sub('{' + 'class' + '}', _class.to_s)
163
+
164
+ # query parameters
165
+ query_params = {}
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
+ # HTTP header 'Content-Type'
172
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
173
+
174
+ # form parameters
175
+ form_params = {}
176
+
177
+ # http body (model)
178
+ post_body = nil
179
+ auth_names = ['OAuth2']
180
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
181
+ :header_params => header_params,
182
+ :query_params => query_params,
183
+ :form_params => form_params,
184
+ :body => post_body,
185
+ :auth_names => auth_names,
186
+ :return_type => 'ClassDetails')
187
+ if @api_client.config.debugging
188
+ @api_client.config.logger.debug "API called: ClassApi#archive_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
189
+ end
190
+ return data, status_code, headers
191
+ end
192
+
193
+ # Copy an assignment
194
+ # Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app.
195
+ # @param _class Unique identifier of the class
196
+ # @param assignment Unique identifier of the assignment
197
+ # @param body
198
+ # @param [Hash] opts the optional parameters
199
+ # @return [Assignment]
200
+ def copy_assignment(_class, assignment, body, opts = {})
201
+ data, _status_code, _headers = copy_assignment_with_http_info(_class, assignment, body, opts)
202
+ return data
203
+ end
204
+
205
+ # Copy an assignment
206
+ # Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app.
207
+ # @param _class Unique identifier of the class
208
+ # @param assignment Unique identifier of the assignment
209
+ # @param body
210
+ # @param [Hash] opts the optional parameters
211
+ # @return [Array<(Assignment, Fixnum, Hash)>] Assignment data, response status code and response headers
212
+ def copy_assignment_with_http_info(_class, assignment, body, opts = {})
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug "Calling API: ClassApi.copy_assignment ..."
215
+ end
216
+ # verify the required parameter '_class' is set
217
+ if @api_client.config.client_side_validation && _class.nil?
218
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.copy_assignment"
219
+ end
220
+ # verify the required parameter 'assignment' is set
221
+ if @api_client.config.client_side_validation && assignment.nil?
222
+ fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.copy_assignment"
223
+ end
224
+ # verify the required parameter 'body' is set
225
+ if @api_client.config.client_side_validation && body.nil?
226
+ fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.copy_assignment"
227
+ end
228
+ # resource path
229
+ local_var_path = "/classes/{class}/assignments/{assignment}/copy".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s)
230
+
231
+ # query parameters
232
+ query_params = {}
233
+
234
+ # header parameters
235
+ header_params = {}
236
+ # HTTP header 'Accept' (if needed)
237
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
238
+ # HTTP header 'Content-Type'
239
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
240
+
241
+ # form parameters
242
+ form_params = {}
243
+
244
+ # http body (model)
245
+ post_body = @api_client.object_to_http_body(body)
246
+ auth_names = ['OAuth2']
247
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
248
+ :header_params => header_params,
249
+ :query_params => query_params,
250
+ :form_params => form_params,
251
+ :body => post_body,
252
+ :auth_names => auth_names,
253
+ :return_type => 'Assignment')
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug "API called: ClassApi#copy_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
256
+ end
257
+ return data, status_code, headers
258
+ end
259
+
260
+ # Assignment creation
261
+ # Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course.
262
+ # @param _class Unique identifier of the class
263
+ # @param [Hash] opts the optional parameters
264
+ # @option opts [AssignmentCreation] :body
265
+ # @return [Assignment]
266
+ def create_assignment(_class, opts = {})
267
+ data, _status_code, _headers = create_assignment_with_http_info(_class, opts)
268
+ return data
269
+ end
270
+
271
+ # Assignment creation
272
+ # Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course.
273
+ # @param _class Unique identifier of the class
274
+ # @param [Hash] opts the optional parameters
275
+ # @option opts [AssignmentCreation] :body
276
+ # @return [Array<(Assignment, Fixnum, Hash)>] Assignment data, response status code and response headers
277
+ def create_assignment_with_http_info(_class, opts = {})
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug "Calling API: ClassApi.create_assignment ..."
280
+ end
281
+ # verify the required parameter '_class' is set
282
+ if @api_client.config.client_side_validation && _class.nil?
283
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.create_assignment"
284
+ end
285
+ # resource path
286
+ local_var_path = "/classes/{class}/assignments".sub('{' + 'class' + '}', _class.to_s)
287
+
288
+ # query parameters
289
+ query_params = {}
290
+
291
+ # header parameters
292
+ header_params = {}
293
+ # HTTP header 'Accept' (if needed)
294
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
295
+ # HTTP header 'Content-Type'
296
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
297
+
298
+ # form parameters
299
+ form_params = {}
300
+
301
+ # http body (model)
302
+ post_body = @api_client.object_to_http_body(opts[:'body'])
303
+ auth_names = ['OAuth2']
304
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
305
+ :header_params => header_params,
306
+ :query_params => query_params,
307
+ :form_params => form_params,
308
+ :body => post_body,
309
+ :auth_names => auth_names,
310
+ :return_type => 'Assignment')
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug "API called: ClassApi#create_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
313
+ end
314
+ return data, status_code, headers
315
+ end
316
+
317
+ # Create a new class
318
+ # Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `POST /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response.
319
+ # @param body
320
+ # @param [Hash] opts the optional parameters
321
+ # @return [ClassDetails]
322
+ def create_class(body, opts = {})
323
+ data, _status_code, _headers = create_class_with_http_info(body, opts)
324
+ return data
325
+ end
326
+
327
+ # Create a new class
328
+ # Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using &#x60;POST /classes/{class}/users/{user}&#x60;, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using &#x60;POST /classes/enroll/{enrollmentCode}&#x60; and the &#x60;enrollmentCode&#x60; returned in the &#x60;ClassDetails&#x60; response.
329
+ # @param body
330
+ # @param [Hash] opts the optional parameters
331
+ # @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers
332
+ def create_class_with_http_info(body, opts = {})
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug "Calling API: ClassApi.create_class ..."
335
+ end
336
+ # verify the required parameter 'body' is set
337
+ if @api_client.config.client_side_validation && body.nil?
338
+ fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.create_class"
339
+ end
340
+ # resource path
341
+ local_var_path = "/classes"
342
+
343
+ # query parameters
344
+ query_params = {}
345
+
346
+ # header parameters
347
+ header_params = {}
348
+ # HTTP header 'Accept' (if needed)
349
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
350
+ # HTTP header 'Content-Type'
351
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
352
+
353
+ # form parameters
354
+ form_params = {}
355
+
356
+ # http body (model)
357
+ post_body = @api_client.object_to_http_body(body)
358
+ auth_names = ['OAuth2']
359
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
360
+ :header_params => header_params,
361
+ :query_params => query_params,
362
+ :form_params => form_params,
363
+ :body => post_body,
364
+ :auth_names => auth_names,
365
+ :return_type => 'ClassDetails')
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug "API called: ClassApi#create_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
368
+ end
369
+ return data, status_code, headers
370
+ end
371
+
372
+ # Create or edit a submission
373
+ # Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id.
374
+ # @param _class Unique identifier of the class
375
+ # @param assignment Unique identifier of the assignment
376
+ # @param body
377
+ # @param [Hash] opts the optional parameters
378
+ # @return [AssignmentSubmission]
379
+ def create_submission(_class, assignment, body, opts = {})
380
+ data, _status_code, _headers = create_submission_with_http_info(_class, assignment, body, opts)
381
+ return data
382
+ end
383
+
384
+ # Create or edit a submission
385
+ # Use this method as a student to create, update and submit a submission related to an assignment. Students can only set &#x60;attachments&#x60;, &#x60;studentComment&#x60; and &#x60;submit&#x60;. Teachers can use &#x60;PUT /classes/{class}/assignments/{assignment}/submissions/{submission}&#x60; to update a submission by id.
386
+ # @param _class Unique identifier of the class
387
+ # @param assignment Unique identifier of the assignment
388
+ # @param body
389
+ # @param [Hash] opts the optional parameters
390
+ # @return [Array<(AssignmentSubmission, Fixnum, Hash)>] AssignmentSubmission data, response status code and response headers
391
+ def create_submission_with_http_info(_class, assignment, body, opts = {})
392
+ if @api_client.config.debugging
393
+ @api_client.config.logger.debug "Calling API: ClassApi.create_submission ..."
394
+ end
395
+ # verify the required parameter '_class' is set
396
+ if @api_client.config.client_side_validation && _class.nil?
397
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.create_submission"
398
+ end
399
+ # verify the required parameter 'assignment' is set
400
+ if @api_client.config.client_side_validation && assignment.nil?
401
+ fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.create_submission"
402
+ end
403
+ # verify the required parameter 'body' is set
404
+ if @api_client.config.client_side_validation && body.nil?
405
+ fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.create_submission"
406
+ end
407
+ # resource path
408
+ local_var_path = "/classes/{class}/assignments/{assignment}/submissions".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s)
409
+
410
+ # query parameters
411
+ query_params = {}
412
+
413
+ # header parameters
414
+ header_params = {}
415
+ # HTTP header 'Accept' (if needed)
416
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
417
+ # HTTP header 'Content-Type'
418
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
419
+
420
+ # form parameters
421
+ form_params = {}
422
+
423
+ # http body (model)
424
+ post_body = @api_client.object_to_http_body(body)
425
+ auth_names = ['OAuth2']
426
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
427
+ :header_params => header_params,
428
+ :query_params => query_params,
429
+ :form_params => form_params,
430
+ :body => post_body,
431
+ :auth_names => auth_names,
432
+ :return_type => 'AssignmentSubmission')
433
+ if @api_client.config.debugging
434
+ @api_client.config.logger.debug "API called: ClassApi#create_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
435
+ end
436
+ return data, status_code, headers
437
+ end
438
+
439
+ # Remove a user from the class
440
+ # This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.
441
+ # @param _class Unique identifier of the class
442
+ # @param user Unique identifier of the user
443
+ # @param [Hash] opts the optional parameters
444
+ # @return [nil]
445
+ def delete_class_user(_class, user, opts = {})
446
+ delete_class_user_with_http_info(_class, user, opts)
447
+ return nil
448
+ end
449
+
450
+ # Remove a user from the class
451
+ # This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.
452
+ # @param _class Unique identifier of the class
453
+ # @param user Unique identifier of the user
454
+ # @param [Hash] opts the optional parameters
455
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
456
+ def delete_class_user_with_http_info(_class, user, opts = {})
457
+ if @api_client.config.debugging
458
+ @api_client.config.logger.debug "Calling API: ClassApi.delete_class_user ..."
459
+ end
460
+ # verify the required parameter '_class' is set
461
+ if @api_client.config.client_side_validation && _class.nil?
462
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.delete_class_user"
463
+ end
464
+ # verify the required parameter 'user' is set
465
+ if @api_client.config.client_side_validation && user.nil?
466
+ fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.delete_class_user"
467
+ end
468
+ # resource path
469
+ local_var_path = "/classes/{class}/users/{user}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'user' + '}', user.to_s)
470
+
471
+ # query parameters
472
+ query_params = {}
473
+
474
+ # header parameters
475
+ header_params = {}
476
+ # HTTP header 'Accept' (if needed)
477
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
478
+ # HTTP header 'Content-Type'
479
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
480
+
481
+ # form parameters
482
+ form_params = {}
483
+
484
+ # http body (model)
485
+ post_body = nil
486
+ auth_names = ['OAuth2']
487
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
488
+ :header_params => header_params,
489
+ :query_params => query_params,
490
+ :form_params => form_params,
491
+ :body => post_body,
492
+ :auth_names => auth_names)
493
+ if @api_client.config.debugging
494
+ @api_client.config.logger.debug "API called: ClassApi#delete_class_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
495
+ end
496
+ return data, status_code, headers
497
+ end
498
+
499
+ # Edit a submission
500
+ # Use this method as a teacher to update the different submission and give feedback. Teachers can only set `returnFeedback`
501
+ # @param _class Unique identifier of the class
502
+ # @param assignment Unique identifier of the assignment
503
+ # @param submission Unique identifier of the submission
504
+ # @param body
505
+ # @param [Hash] opts the optional parameters
506
+ # @return [AssignmentSubmission]
507
+ def edit_submission(_class, assignment, submission, body, opts = {})
508
+ data, _status_code, _headers = edit_submission_with_http_info(_class, assignment, submission, body, opts)
509
+ return data
510
+ end
511
+
512
+ # Edit a submission
513
+ # Use this method as a teacher to update the different submission and give feedback. Teachers can only set &#x60;returnFeedback&#x60;
514
+ # @param _class Unique identifier of the class
515
+ # @param assignment Unique identifier of the assignment
516
+ # @param submission Unique identifier of the submission
517
+ # @param body
518
+ # @param [Hash] opts the optional parameters
519
+ # @return [Array<(AssignmentSubmission, Fixnum, Hash)>] AssignmentSubmission data, response status code and response headers
520
+ def edit_submission_with_http_info(_class, assignment, submission, body, opts = {})
521
+ if @api_client.config.debugging
522
+ @api_client.config.logger.debug "Calling API: ClassApi.edit_submission ..."
523
+ end
524
+ # verify the required parameter '_class' is set
525
+ if @api_client.config.client_side_validation && _class.nil?
526
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.edit_submission"
527
+ end
528
+ # verify the required parameter 'assignment' is set
529
+ if @api_client.config.client_side_validation && assignment.nil?
530
+ fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.edit_submission"
531
+ end
532
+ # verify the required parameter 'submission' is set
533
+ if @api_client.config.client_side_validation && submission.nil?
534
+ fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.edit_submission"
535
+ end
536
+ # verify the required parameter 'body' is set
537
+ if @api_client.config.client_side_validation && body.nil?
538
+ fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.edit_submission"
539
+ end
540
+ # resource path
541
+ local_var_path = "/classes/{class}/assignments/{assignment}/submissions/{submission}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s).sub('{' + 'submission' + '}', submission.to_s)
542
+
543
+ # query parameters
544
+ query_params = {}
545
+
546
+ # header parameters
547
+ header_params = {}
548
+ # HTTP header 'Accept' (if needed)
549
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
550
+ # HTTP header 'Content-Type'
551
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
552
+
553
+ # form parameters
554
+ form_params = {}
555
+
556
+ # http body (model)
557
+ post_body = @api_client.object_to_http_body(body)
558
+ auth_names = ['OAuth2']
559
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
560
+ :header_params => header_params,
561
+ :query_params => query_params,
562
+ :form_params => form_params,
563
+ :body => post_body,
564
+ :auth_names => auth_names,
565
+ :return_type => 'AssignmentSubmission')
566
+ if @api_client.config.debugging
567
+ @api_client.config.logger.debug "API called: ClassApi#edit_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
568
+ end
569
+ return data, status_code, headers
570
+ end
571
+
572
+ # Join a class
573
+ # Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization.
574
+ # @param enrollment_code The enrollment code, available to the teacher in &#x60;ClassDetails&#x60;
575
+ # @param [Hash] opts the optional parameters
576
+ # @return [ClassDetails]
577
+ def enroll_class(enrollment_code, opts = {})
578
+ data, _status_code, _headers = enroll_class_with_http_info(enrollment_code, opts)
579
+ return data
580
+ end
581
+
582
+ # Join a class
583
+ # Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the &#x60;ClassDetails&#x60; returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization.
584
+ # @param enrollment_code The enrollment code, available to the teacher in &#x60;ClassDetails&#x60;
585
+ # @param [Hash] opts the optional parameters
586
+ # @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers
587
+ def enroll_class_with_http_info(enrollment_code, opts = {})
588
+ if @api_client.config.debugging
589
+ @api_client.config.logger.debug "Calling API: ClassApi.enroll_class ..."
590
+ end
591
+ # verify the required parameter 'enrollment_code' is set
592
+ if @api_client.config.client_side_validation && enrollment_code.nil?
593
+ fail ArgumentError, "Missing the required parameter 'enrollment_code' when calling ClassApi.enroll_class"
594
+ end
595
+ # resource path
596
+ local_var_path = "/classes/enroll/{enrollmentCode}".sub('{' + 'enrollmentCode' + '}', enrollment_code.to_s)
597
+
598
+ # query parameters
599
+ query_params = {}
600
+
601
+ # header parameters
602
+ header_params = {}
603
+ # HTTP header 'Accept' (if needed)
604
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
605
+ # HTTP header 'Content-Type'
606
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
607
+
608
+ # form parameters
609
+ form_params = {}
610
+
611
+ # http body (model)
612
+ post_body = nil
613
+ auth_names = ['OAuth2']
614
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
615
+ :header_params => header_params,
616
+ :query_params => query_params,
617
+ :form_params => form_params,
618
+ :body => post_body,
619
+ :auth_names => auth_names,
620
+ :return_type => 'ClassDetails')
621
+ if @api_client.config.debugging
622
+ @api_client.config.logger.debug "API called: ClassApi#enroll_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
623
+ end
624
+ return data, status_code, headers
625
+ end
626
+
627
+ # Get the details of a single class
628
+ #
629
+ # @param _class Unique identifier of the class
630
+ # @param [Hash] opts the optional parameters
631
+ # @return [ClassDetails]
632
+ def get_class(_class, opts = {})
633
+ data, _status_code, _headers = get_class_with_http_info(_class, opts)
634
+ return data
635
+ end
636
+
637
+ # Get the details of a single class
638
+ #
639
+ # @param _class Unique identifier of the class
640
+ # @param [Hash] opts the optional parameters
641
+ # @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers
642
+ def get_class_with_http_info(_class, opts = {})
643
+ if @api_client.config.debugging
644
+ @api_client.config.logger.debug "Calling API: ClassApi.get_class ..."
645
+ end
646
+ # verify the required parameter '_class' is set
647
+ if @api_client.config.client_side_validation && _class.nil?
648
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_class"
649
+ end
650
+ # resource path
651
+ local_var_path = "/classes/{class}".sub('{' + 'class' + '}', _class.to_s)
652
+
653
+ # query parameters
654
+ query_params = {}
655
+
656
+ # header parameters
657
+ header_params = {}
658
+ # HTTP header 'Accept' (if needed)
659
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
660
+ # HTTP header 'Content-Type'
661
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
662
+
663
+ # form parameters
664
+ form_params = {}
665
+
666
+ # http body (model)
667
+ post_body = nil
668
+ auth_names = ['OAuth2']
669
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
670
+ :header_params => header_params,
671
+ :query_params => query_params,
672
+ :form_params => form_params,
673
+ :body => post_body,
674
+ :auth_names => auth_names,
675
+ :return_type => 'ClassDetails')
676
+ if @api_client.config.debugging
677
+ @api_client.config.logger.debug "API called: ClassApi#get_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
678
+ end
679
+ return data, status_code, headers
680
+ end
681
+
682
+ # List submissions related to the score
683
+ # This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document.
684
+ # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
685
+ # @param [Hash] opts the optional parameters
686
+ # @return [Array<AssignmentSubmission>]
687
+ def get_score_submissions(score, opts = {})
688
+ data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
689
+ return data
690
+ end
691
+
692
+ # List submissions related to the score
693
+ # This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document.
694
+ # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
695
+ # @param [Hash] opts the optional parameters
696
+ # @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
697
+ def get_score_submissions_with_http_info(score, opts = {})
698
+ if @api_client.config.debugging
699
+ @api_client.config.logger.debug "Calling API: ClassApi.get_score_submissions ..."
700
+ end
701
+ # verify the required parameter 'score' is set
702
+ if @api_client.config.client_side_validation && score.nil?
703
+ fail ArgumentError, "Missing the required parameter 'score' when calling ClassApi.get_score_submissions"
704
+ end
705
+ # resource path
706
+ local_var_path = "/scores/{score}/submissions".sub('{' + 'score' + '}', score.to_s)
707
+
708
+ # query parameters
709
+ query_params = {}
710
+
711
+ # header parameters
712
+ header_params = {}
713
+ # HTTP header 'Accept' (if needed)
714
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
715
+ # HTTP header 'Content-Type'
716
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
717
+
718
+ # form parameters
719
+ form_params = {}
720
+
721
+ # http body (model)
722
+ post_body = nil
723
+ auth_names = ['OAuth2']
724
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
725
+ :header_params => header_params,
726
+ :query_params => query_params,
727
+ :form_params => form_params,
728
+ :body => post_body,
729
+ :auth_names => auth_names,
730
+ :return_type => 'Array<AssignmentSubmission>')
731
+ if @api_client.config.debugging
732
+ @api_client.config.logger.debug "API called: ClassApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
733
+ end
734
+ return data, status_code, headers
735
+ end
736
+
737
+ # Get a student submission
738
+ #
739
+ # @param _class Unique identifier of the class
740
+ # @param assignment Unique identifier of the assignment
741
+ # @param submission Unique identifier of the submission
742
+ # @param [Hash] opts the optional parameters
743
+ # @return [AssignmentSubmission]
744
+ def get_submission(_class, assignment, submission, opts = {})
745
+ data, _status_code, _headers = get_submission_with_http_info(_class, assignment, submission, opts)
746
+ return data
747
+ end
748
+
749
+ # Get a student submission
750
+ #
751
+ # @param _class Unique identifier of the class
752
+ # @param assignment Unique identifier of the assignment
753
+ # @param submission Unique identifier of the submission
754
+ # @param [Hash] opts the optional parameters
755
+ # @return [Array<(AssignmentSubmission, Fixnum, Hash)>] AssignmentSubmission data, response status code and response headers
756
+ def get_submission_with_http_info(_class, assignment, submission, opts = {})
757
+ if @api_client.config.debugging
758
+ @api_client.config.logger.debug "Calling API: ClassApi.get_submission ..."
759
+ end
760
+ # verify the required parameter '_class' is set
761
+ if @api_client.config.client_side_validation && _class.nil?
762
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submission"
763
+ end
764
+ # verify the required parameter 'assignment' is set
765
+ if @api_client.config.client_side_validation && assignment.nil?
766
+ fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submission"
767
+ end
768
+ # verify the required parameter 'submission' is set
769
+ if @api_client.config.client_side_validation && submission.nil?
770
+ fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.get_submission"
771
+ end
772
+ # resource path
773
+ local_var_path = "/classes/{class}/assignments/{assignment}/submissions/{submission}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s).sub('{' + 'submission' + '}', submission.to_s)
774
+
775
+ # query parameters
776
+ query_params = {}
777
+
778
+ # header parameters
779
+ header_params = {}
780
+ # HTTP header 'Accept' (if needed)
781
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
782
+ # HTTP header 'Content-Type'
783
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
784
+
785
+ # form parameters
786
+ form_params = {}
787
+
788
+ # http body (model)
789
+ post_body = nil
790
+ auth_names = ['OAuth2']
791
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
792
+ :header_params => header_params,
793
+ :query_params => query_params,
794
+ :form_params => form_params,
795
+ :body => post_body,
796
+ :auth_names => auth_names,
797
+ :return_type => 'AssignmentSubmission')
798
+ if @api_client.config.debugging
799
+ @api_client.config.logger.debug "API called: ClassApi#get_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
800
+ end
801
+ return data, status_code, headers
802
+ end
803
+
804
+ # List the students' submissions
805
+ #
806
+ # @param _class Unique identifier of the class
807
+ # @param assignment Unique identifier of the assignment
808
+ # @param [Hash] opts the optional parameters
809
+ # @return [Array<AssignmentSubmission>]
810
+ def get_submissions(_class, assignment, opts = {})
811
+ data, _status_code, _headers = get_submissions_with_http_info(_class, assignment, opts)
812
+ return data
813
+ end
814
+
815
+ # List the students&#39; submissions
816
+ #
817
+ # @param _class Unique identifier of the class
818
+ # @param assignment Unique identifier of the assignment
819
+ # @param [Hash] opts the optional parameters
820
+ # @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
821
+ def get_submissions_with_http_info(_class, assignment, opts = {})
822
+ if @api_client.config.debugging
823
+ @api_client.config.logger.debug "Calling API: ClassApi.get_submissions ..."
824
+ end
825
+ # verify the required parameter '_class' is set
826
+ if @api_client.config.client_side_validation && _class.nil?
827
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submissions"
828
+ end
829
+ # verify the required parameter 'assignment' is set
830
+ if @api_client.config.client_side_validation && assignment.nil?
831
+ fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submissions"
832
+ end
833
+ # resource path
834
+ local_var_path = "/classes/{class}/assignments/{assignment}/submissions".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s)
835
+
836
+ # query parameters
837
+ query_params = {}
838
+
839
+ # header parameters
840
+ header_params = {}
841
+ # HTTP header 'Accept' (if needed)
842
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
843
+ # HTTP header 'Content-Type'
844
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
845
+
846
+ # form parameters
847
+ form_params = {}
848
+
849
+ # http body (model)
850
+ post_body = nil
851
+ auth_names = ['OAuth2']
852
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
853
+ :header_params => header_params,
854
+ :query_params => query_params,
855
+ :form_params => form_params,
856
+ :body => post_body,
857
+ :auth_names => auth_names,
858
+ :return_type => 'Array<AssignmentSubmission>')
859
+ if @api_client.config.debugging
860
+ @api_client.config.logger.debug "API called: ClassApi#get_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
861
+ end
862
+ return data, status_code, headers
863
+ end
864
+
865
+ # Assignments listing
866
+ #
867
+ # @param _class Unique identifier of the class
868
+ # @param [Hash] opts the optional parameters
869
+ # @return [Array<Assignment>]
870
+ def list_assignments(_class, opts = {})
871
+ data, _status_code, _headers = list_assignments_with_http_info(_class, opts)
872
+ return data
873
+ end
874
+
875
+ # Assignments listing
876
+ #
877
+ # @param _class Unique identifier of the class
878
+ # @param [Hash] opts the optional parameters
879
+ # @return [Array<(Array<Assignment>, Fixnum, Hash)>] Array<Assignment> data, response status code and response headers
880
+ def list_assignments_with_http_info(_class, opts = {})
881
+ if @api_client.config.debugging
882
+ @api_client.config.logger.debug "Calling API: ClassApi.list_assignments ..."
883
+ end
884
+ # verify the required parameter '_class' is set
885
+ if @api_client.config.client_side_validation && _class.nil?
886
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.list_assignments"
887
+ end
888
+ # resource path
889
+ local_var_path = "/classes/{class}/assignments".sub('{' + 'class' + '}', _class.to_s)
890
+
891
+ # query parameters
892
+ query_params = {}
893
+
894
+ # header parameters
895
+ header_params = {}
896
+ # HTTP header 'Accept' (if needed)
897
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
898
+ # HTTP header 'Content-Type'
899
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
900
+
901
+ # form parameters
902
+ form_params = {}
903
+
904
+ # http body (model)
905
+ post_body = nil
906
+ auth_names = ['OAuth2']
907
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
908
+ :header_params => header_params,
909
+ :query_params => query_params,
910
+ :form_params => form_params,
911
+ :body => post_body,
912
+ :auth_names => auth_names,
913
+ :return_type => 'Array<Assignment>')
914
+ if @api_client.config.debugging
915
+ @api_client.config.logger.debug "API called: ClassApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
916
+ end
917
+ return data, status_code, headers
918
+ end
919
+
920
+ # List the submissions for a student
921
+ # Use this method as a teacher to list all the assignment submissions sent by a student of the class
922
+ # @param _class Unique identifier of the class
923
+ # @param user Unique identifier of the user
924
+ # @param [Hash] opts the optional parameters
925
+ # @return [Array<AssignmentSubmission>]
926
+ def list_class_student_submissions(_class, user, opts = {})
927
+ data, _status_code, _headers = list_class_student_submissions_with_http_info(_class, user, opts)
928
+ return data
929
+ end
930
+
931
+ # List the submissions for a student
932
+ # Use this method as a teacher to list all the assignment submissions sent by a student of the class
933
+ # @param _class Unique identifier of the class
934
+ # @param user Unique identifier of the user
935
+ # @param [Hash] opts the optional parameters
936
+ # @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
937
+ def list_class_student_submissions_with_http_info(_class, user, opts = {})
938
+ if @api_client.config.debugging
939
+ @api_client.config.logger.debug "Calling API: ClassApi.list_class_student_submissions ..."
940
+ end
941
+ # verify the required parameter '_class' is set
942
+ if @api_client.config.client_side_validation && _class.nil?
943
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.list_class_student_submissions"
944
+ end
945
+ # verify the required parameter 'user' is set
946
+ if @api_client.config.client_side_validation && user.nil?
947
+ fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.list_class_student_submissions"
948
+ end
949
+ # resource path
950
+ local_var_path = "/classes/{class}/students/{user}/submissions".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'user' + '}', user.to_s)
951
+
952
+ # query parameters
953
+ query_params = {}
954
+
955
+ # header parameters
956
+ header_params = {}
957
+ # HTTP header 'Accept' (if needed)
958
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
959
+ # HTTP header 'Content-Type'
960
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
961
+
962
+ # form parameters
963
+ form_params = {}
964
+
965
+ # http body (model)
966
+ post_body = nil
967
+ auth_names = ['OAuth2']
968
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
969
+ :header_params => header_params,
970
+ :query_params => query_params,
971
+ :form_params => form_params,
972
+ :body => post_body,
973
+ :auth_names => auth_names,
974
+ :return_type => 'Array<AssignmentSubmission>')
975
+ if @api_client.config.debugging
976
+ @api_client.config.logger.debug "API called: ClassApi#list_class_student_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
977
+ end
978
+ return data, status_code, headers
979
+ end
980
+
981
+ # List the classes available for the current user
982
+ #
983
+ # @param [Hash] opts the optional parameters
984
+ # @option opts [String] :state Filter the classes by state (default to active)
985
+ # @return [Array<ClassDetails>]
986
+ def list_classes(opts = {})
987
+ data, _status_code, _headers = list_classes_with_http_info(opts)
988
+ return data
989
+ end
990
+
991
+ # List the classes available for the current user
992
+ #
993
+ # @param [Hash] opts the optional parameters
994
+ # @option opts [String] :state Filter the classes by state
995
+ # @return [Array<(Array<ClassDetails>, Fixnum, Hash)>] Array<ClassDetails> data, response status code and response headers
996
+ def list_classes_with_http_info(opts = {})
997
+ if @api_client.config.debugging
998
+ @api_client.config.logger.debug "Calling API: ClassApi.list_classes ..."
999
+ end
1000
+ if @api_client.config.client_side_validation && opts[:'state'] && !['active', 'inactive', 'archived'].include?(opts[:'state'])
1001
+ fail ArgumentError, 'invalid value for "state", must be one of active, inactive, archived'
1002
+ end
1003
+ # resource path
1004
+ local_var_path = "/classes"
1005
+
1006
+ # query parameters
1007
+ query_params = {}
1008
+ query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
1009
+
1010
+ # header parameters
1011
+ header_params = {}
1012
+ # HTTP header 'Accept' (if needed)
1013
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1014
+ # HTTP header 'Content-Type'
1015
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1016
+
1017
+ # form parameters
1018
+ form_params = {}
1019
+
1020
+ # http body (model)
1021
+ post_body = nil
1022
+ auth_names = ['OAuth2']
1023
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1024
+ :header_params => header_params,
1025
+ :query_params => query_params,
1026
+ :form_params => form_params,
1027
+ :body => post_body,
1028
+ :auth_names => auth_names,
1029
+ :return_type => 'Array<ClassDetails>')
1030
+ if @api_client.config.debugging
1031
+ @api_client.config.logger.debug "API called: ClassApi#list_classes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1032
+ end
1033
+ return data, status_code, headers
1034
+ end
1035
+
1036
+ # Unarchive the class
1037
+ # Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
1038
+ # @param _class Unique identifier of the class
1039
+ # @param [Hash] opts the optional parameters
1040
+ # @return [ClassDetails]
1041
+ def unarchive_class(_class, opts = {})
1042
+ data, _status_code, _headers = unarchive_class_with_http_info(_class, opts)
1043
+ return data
1044
+ end
1045
+
1046
+ # Unarchive the class
1047
+ # Mark the class as &#x60;active&#x60;. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
1048
+ # @param _class Unique identifier of the class
1049
+ # @param [Hash] opts the optional parameters
1050
+ # @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers
1051
+ def unarchive_class_with_http_info(_class, opts = {})
1052
+ if @api_client.config.debugging
1053
+ @api_client.config.logger.debug "Calling API: ClassApi.unarchive_class ..."
1054
+ end
1055
+ # verify the required parameter '_class' is set
1056
+ if @api_client.config.client_side_validation && _class.nil?
1057
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.unarchive_class"
1058
+ end
1059
+ # resource path
1060
+ local_var_path = "/classes/{class}/archive".sub('{' + 'class' + '}', _class.to_s)
1061
+
1062
+ # query parameters
1063
+ query_params = {}
1064
+
1065
+ # header parameters
1066
+ header_params = {}
1067
+ # HTTP header 'Accept' (if needed)
1068
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1069
+ # HTTP header 'Content-Type'
1070
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1071
+
1072
+ # form parameters
1073
+ form_params = {}
1074
+
1075
+ # http body (model)
1076
+ post_body = nil
1077
+ auth_names = ['OAuth2']
1078
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1079
+ :header_params => header_params,
1080
+ :query_params => query_params,
1081
+ :form_params => form_params,
1082
+ :body => post_body,
1083
+ :auth_names => auth_names,
1084
+ :return_type => 'ClassDetails')
1085
+ if @api_client.config.debugging
1086
+ @api_client.config.logger.debug "API called: ClassApi#unarchive_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1087
+ end
1088
+ return data, status_code, headers
1089
+ end
1090
+
1091
+ # Update the class
1092
+ # Update the meta information of the class
1093
+ # @param _class Unique identifier of the class
1094
+ # @param [Hash] opts the optional parameters
1095
+ # @option opts [ClassUpdate] :body Details of the Class
1096
+ # @return [ClassDetails]
1097
+ def update_class(_class, opts = {})
1098
+ data, _status_code, _headers = update_class_with_http_info(_class, opts)
1099
+ return data
1100
+ end
1101
+
1102
+ # Update the class
1103
+ # Update the meta information of the class
1104
+ # @param _class Unique identifier of the class
1105
+ # @param [Hash] opts the optional parameters
1106
+ # @option opts [ClassUpdate] :body Details of the Class
1107
+ # @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers
1108
+ def update_class_with_http_info(_class, opts = {})
1109
+ if @api_client.config.debugging
1110
+ @api_client.config.logger.debug "Calling API: ClassApi.update_class ..."
1111
+ end
1112
+ # verify the required parameter '_class' is set
1113
+ if @api_client.config.client_side_validation && _class.nil?
1114
+ fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.update_class"
1115
+ end
1116
+ # resource path
1117
+ local_var_path = "/classes/{class}".sub('{' + 'class' + '}', _class.to_s)
1118
+
1119
+ # query parameters
1120
+ query_params = {}
1121
+
1122
+ # header parameters
1123
+ header_params = {}
1124
+ # HTTP header 'Accept' (if needed)
1125
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1126
+ # HTTP header 'Content-Type'
1127
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1128
+
1129
+ # form parameters
1130
+ form_params = {}
1131
+
1132
+ # http body (model)
1133
+ post_body = @api_client.object_to_http_body(opts[:'body'])
1134
+ auth_names = ['OAuth2']
1135
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1136
+ :header_params => header_params,
1137
+ :query_params => query_params,
1138
+ :form_params => form_params,
1139
+ :body => post_body,
1140
+ :auth_names => auth_names,
1141
+ :return_type => 'ClassDetails')
1142
+ if @api_client.config.debugging
1143
+ @api_client.config.logger.debug "API called: ClassApi#update_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1144
+ end
1145
+ return data, status_code, headers
1146
+ end
1147
+ end
1148
+ end