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,1737 @@
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.0
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 SwaggerClient
16
+ class ScoreApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Add a new collaborator
24
+ # Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a document. - To add an existing Flat user to the document, specify its unique identifier in the `user` property. - To invite an external user to the document, specify its email in the `userEmail` property. - To add a Flat group to the document, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
25
+ # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
26
+ # @param body
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [ScoreCollaborator]
29
+ def add_score_collaborator(score, body, opts = {})
30
+ data, _status_code, _headers = add_score_collaborator_with_http_info(score, body, opts)
31
+ return data
32
+ end
33
+
34
+ # Add a new collaborator
35
+ # Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a document. - To add an existing Flat user to the document, specify its unique identifier in the `user` property. - To invite an external user to the document, specify its email in the `userEmail` property. - To add a Flat group to the document, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
36
+ # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
37
+ # @param body
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [Array<(ScoreCollaborator, Fixnum, Hash)>] ScoreCollaborator data, response status code and response headers
40
+ def add_score_collaborator_with_http_info(score, body, opts = {})
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug "Calling API: ScoreApi.add_score_collaborator ..."
43
+ end
44
+ # verify the required parameter 'score' is set
45
+ if @api_client.config.client_side_validation && score.nil?
46
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.add_score_collaborator"
47
+ end
48
+ # verify the required parameter 'body' is set
49
+ if @api_client.config.client_side_validation && body.nil?
50
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_collaborator"
51
+ end
52
+ # resource path
53
+ local_var_path = "/scores/{score}/collaborators".sub('{' + 'score' + '}', score.to_s)
54
+
55
+ # query parameters
56
+ query_params = {}
57
+
58
+ # header parameters
59
+ header_params = {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
62
+ # HTTP header 'Content-Type'
63
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
64
+
65
+ # form parameters
66
+ form_params = {}
67
+
68
+ # http body (model)
69
+ post_body = @api_client.object_to_http_body(body)
70
+ auth_names = ['OAuth2']
71
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names,
77
+ :return_type => 'ScoreCollaborator')
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: ScoreApi#add_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # Add a new video or audio track to the score
85
+ # Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo.
86
+ # @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;).
87
+ # @param body
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [ScoreTrack]
90
+ def add_score_track(score, body, opts = {})
91
+ data, _status_code, _headers = add_score_track_with_http_info(score, body, opts)
92
+ return data
93
+ end
94
+
95
+ # Add a new video or audio track to the score
96
+ # Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo.
97
+ # @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;).
98
+ # @param body
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
101
+ def add_score_track_with_http_info(score, body, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "Calling API: ScoreApi.add_score_track ..."
104
+ end
105
+ # verify the required parameter 'score' is set
106
+ if @api_client.config.client_side_validation && score.nil?
107
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.add_score_track"
108
+ end
109
+ # verify the required parameter 'body' is set
110
+ if @api_client.config.client_side_validation && body.nil?
111
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_track"
112
+ end
113
+ # resource path
114
+ local_var_path = "/scores/{score}/tracks".sub('{' + 'score' + '}', score.to_s)
115
+
116
+ # query parameters
117
+ query_params = {}
118
+
119
+ # header parameters
120
+ header_params = {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
123
+ # HTTP header 'Content-Type'
124
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
125
+
126
+ # form parameters
127
+ form_params = {}
128
+
129
+ # http body (model)
130
+ post_body = @api_client.object_to_http_body(body)
131
+ auth_names = ['OAuth2']
132
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => 'ScoreTrack')
139
+ if @api_client.config.debugging
140
+ @api_client.config.logger.debug "API called: ScoreApi#add_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
141
+ end
142
+ return data, status_code, headers
143
+ end
144
+
145
+ # Create a new score
146
+ # Use this API method to **create a new music score in the current User account**. You will need a MusicXML 3 (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`) or a MIDI (`audio/midi`) file to create the new Flat document. This API call will automatically create the first revision of the document, the score can be modified by the using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions/{revision}`). The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups).
147
+ # @param body
148
+ # @param [Hash] opts the optional parameters
149
+ # @return [ScoreDetails]
150
+ def create_score(body, opts = {})
151
+ data, _status_code, _headers = create_score_with_http_info(body, opts)
152
+ return data
153
+ end
154
+
155
+ # Create a new score
156
+ # Use this API method to **create a new music score in the current User account**. You will need a MusicXML 3 (&#x60;vnd.recordare.musicxml&#x60; or &#x60;vnd.recordare.musicxml+xml&#x60;) or a MIDI (&#x60;audio/midi&#x60;) file to create the new Flat document. This API call will automatically create the first revision of the document, the score can be modified by the using our web application or by uploading a new revision of this file (&#x60;POST /v2/scores/{score}/revisions/{revision}&#x60;). The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups).
157
+ # @param body
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
160
+ def create_score_with_http_info(body, opts = {})
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug "Calling API: ScoreApi.create_score ..."
163
+ end
164
+ # verify the required parameter 'body' is set
165
+ if @api_client.config.client_side_validation && body.nil?
166
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.create_score"
167
+ end
168
+ # resource path
169
+ local_var_path = "/scores"
170
+
171
+ # query parameters
172
+ query_params = {}
173
+
174
+ # header parameters
175
+ header_params = {}
176
+ # HTTP header 'Accept' (if needed)
177
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
178
+ # HTTP header 'Content-Type'
179
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
180
+
181
+ # form parameters
182
+ form_params = {}
183
+
184
+ # http body (model)
185
+ post_body = @api_client.object_to_http_body(body)
186
+ auth_names = ['OAuth2']
187
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
188
+ :header_params => header_params,
189
+ :query_params => query_params,
190
+ :form_params => form_params,
191
+ :body => post_body,
192
+ :auth_names => auth_names,
193
+ :return_type => 'ScoreDetails')
194
+ if @api_client.config.debugging
195
+ @api_client.config.logger.debug "API called: ScoreApi#create_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
+ end
197
+ return data, status_code, headers
198
+ end
199
+
200
+ # Create a new revision
201
+ # Update a score by uploading a new revision for this one.
202
+ # @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;).
203
+ # @param body
204
+ # @param [Hash] opts the optional parameters
205
+ # @return [ScoreRevision]
206
+ def create_score_revision(score, body, opts = {})
207
+ data, _status_code, _headers = create_score_revision_with_http_info(score, body, opts)
208
+ return data
209
+ end
210
+
211
+ # Create a new revision
212
+ # Update a score by uploading a new revision for this one.
213
+ # @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;).
214
+ # @param body
215
+ # @param [Hash] opts the optional parameters
216
+ # @return [Array<(ScoreRevision, Fixnum, Hash)>] ScoreRevision data, response status code and response headers
217
+ def create_score_revision_with_http_info(score, body, opts = {})
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "Calling API: ScoreApi.create_score_revision ..."
220
+ end
221
+ # verify the required parameter 'score' is set
222
+ if @api_client.config.client_side_validation && score.nil?
223
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.create_score_revision"
224
+ end
225
+ # verify the required parameter 'body' is set
226
+ if @api_client.config.client_side_validation && body.nil?
227
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.create_score_revision"
228
+ end
229
+ # resource path
230
+ local_var_path = "/scores/{score}/revisions".sub('{' + 'score' + '}', score.to_s)
231
+
232
+ # query parameters
233
+ query_params = {}
234
+
235
+ # header parameters
236
+ header_params = {}
237
+ # HTTP header 'Accept' (if needed)
238
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
239
+ # HTTP header 'Content-Type'
240
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
241
+
242
+ # form parameters
243
+ form_params = {}
244
+
245
+ # http body (model)
246
+ post_body = @api_client.object_to_http_body(body)
247
+ auth_names = ['OAuth2']
248
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
249
+ :header_params => header_params,
250
+ :query_params => query_params,
251
+ :form_params => form_params,
252
+ :body => post_body,
253
+ :auth_names => auth_names,
254
+ :return_type => 'ScoreRevision')
255
+ if @api_client.config.debugging
256
+ @api_client.config.logger.debug "API called: ScoreApi#create_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
257
+ end
258
+ return data, status_code, headers
259
+ end
260
+
261
+ # Delete a score
262
+ # This API call will schedule the deletion of the score, its revisions, and whole history. The user calling this API method must have the `aclAdmin` rights on this document to process this action. The score won't be accessible anymore after calling this method and the user's quota will directly be updated.
263
+ # @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;).
264
+ # @param [Hash] opts the optional parameters
265
+ # @return [nil]
266
+ def delete_score(score, opts = {})
267
+ delete_score_with_http_info(score, opts)
268
+ return nil
269
+ end
270
+
271
+ # Delete a score
272
+ # This API call will schedule the deletion of the score, its revisions, and whole history. The user calling this API method must have the &#x60;aclAdmin&#x60; rights on this document to process this action. The score won&#39;t be accessible anymore after calling this method and the user&#39;s quota will directly be updated.
273
+ # @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;).
274
+ # @param [Hash] opts the optional parameters
275
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
276
+ def delete_score_with_http_info(score, opts = {})
277
+ if @api_client.config.debugging
278
+ @api_client.config.logger.debug "Calling API: ScoreApi.delete_score ..."
279
+ end
280
+ # verify the required parameter 'score' is set
281
+ if @api_client.config.client_side_validation && score.nil?
282
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.delete_score"
283
+ end
284
+ # resource path
285
+ local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)
286
+
287
+ # query parameters
288
+ query_params = {}
289
+
290
+ # header parameters
291
+ header_params = {}
292
+ # HTTP header 'Accept' (if needed)
293
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
294
+ # HTTP header 'Content-Type'
295
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
296
+
297
+ # form parameters
298
+ form_params = {}
299
+
300
+ # http body (model)
301
+ post_body = nil
302
+ auth_names = ['OAuth2']
303
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
304
+ :header_params => header_params,
305
+ :query_params => query_params,
306
+ :form_params => form_params,
307
+ :body => post_body,
308
+ :auth_names => auth_names)
309
+ if @api_client.config.debugging
310
+ @api_client.config.logger.debug "API called: ScoreApi#delete_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
+ end
312
+ return data, status_code, headers
313
+ end
314
+
315
+ # Delete a comment
316
+ #
317
+ # @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;).
318
+ # @param comment Unique identifier of a sheet music comment
319
+ # @param [Hash] opts the optional parameters
320
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
321
+ # @return [nil]
322
+ def delete_score_comment(score, comment, opts = {})
323
+ delete_score_comment_with_http_info(score, comment, opts)
324
+ return nil
325
+ end
326
+
327
+ # Delete a comment
328
+ #
329
+ # @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;).
330
+ # @param comment Unique identifier of a sheet music comment
331
+ # @param [Hash] opts the optional parameters
332
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
333
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
334
+ def delete_score_comment_with_http_info(score, comment, opts = {})
335
+ if @api_client.config.debugging
336
+ @api_client.config.logger.debug "Calling API: ScoreApi.delete_score_comment ..."
337
+ end
338
+ # verify the required parameter 'score' is set
339
+ if @api_client.config.client_side_validation && score.nil?
340
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.delete_score_comment"
341
+ end
342
+ # verify the required parameter 'comment' is set
343
+ if @api_client.config.client_side_validation && comment.nil?
344
+ fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.delete_score_comment"
345
+ end
346
+ # resource path
347
+ local_var_path = "/scores/{score}/comments/{comment}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
348
+
349
+ # query parameters
350
+ query_params = {}
351
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
352
+
353
+ # header parameters
354
+ header_params = {}
355
+ # HTTP header 'Accept' (if needed)
356
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
357
+ # HTTP header 'Content-Type'
358
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
359
+
360
+ # form parameters
361
+ form_params = {}
362
+
363
+ # http body (model)
364
+ post_body = nil
365
+ auth_names = ['OAuth2']
366
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
367
+ :header_params => header_params,
368
+ :query_params => query_params,
369
+ :form_params => form_params,
370
+ :body => post_body,
371
+ :auth_names => auth_names)
372
+ if @api_client.config.debugging
373
+ @api_client.config.logger.debug "API called: ScoreApi#delete_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
374
+ end
375
+ return data, status_code, headers
376
+ end
377
+
378
+ # Remove an audio or video track linked to the score
379
+ #
380
+ # @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;).
381
+ # @param track Unique identifier of a score audio track
382
+ # @param [Hash] opts the optional parameters
383
+ # @return [nil]
384
+ def delete_score_track(score, track, opts = {})
385
+ delete_score_track_with_http_info(score, track, opts)
386
+ return nil
387
+ end
388
+
389
+ # Remove an audio or video track linked to the score
390
+ #
391
+ # @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;).
392
+ # @param track Unique identifier of a score audio track
393
+ # @param [Hash] opts the optional parameters
394
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
395
+ def delete_score_track_with_http_info(score, track, opts = {})
396
+ if @api_client.config.debugging
397
+ @api_client.config.logger.debug "Calling API: ScoreApi.delete_score_track ..."
398
+ end
399
+ # verify the required parameter 'score' is set
400
+ if @api_client.config.client_side_validation && score.nil?
401
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.delete_score_track"
402
+ end
403
+ # verify the required parameter 'track' is set
404
+ if @api_client.config.client_side_validation && track.nil?
405
+ fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.delete_score_track"
406
+ end
407
+ # resource path
408
+ local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.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 = nil
425
+ auth_names = ['OAuth2']
426
+ data, status_code, headers = @api_client.call_api(:DELETE, 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
+ if @api_client.config.debugging
433
+ @api_client.config.logger.debug "API called: ScoreApi#delete_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
434
+ end
435
+ return data, status_code, headers
436
+ end
437
+
438
+ # Edit a score's metadata
439
+ # This API method allows you to change the metadata of a score document (e.g. its `title` or `privacy`), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (`POST /v2/scores/{score}/revisions/{revision}`).
440
+ # @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;).
441
+ # @param [Hash] opts the optional parameters
442
+ # @option opts [ScoreModification] :body
443
+ # @return [ScoreDetails]
444
+ def edit_score(score, opts = {})
445
+ data, _status_code, _headers = edit_score_with_http_info(score, opts)
446
+ return data
447
+ end
448
+
449
+ # Edit a score&#39;s metadata
450
+ # This API method allows you to change the metadata of a score document (e.g. its &#x60;title&#x60; or &#x60;privacy&#x60;), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (&#x60;POST /v2/scores/{score}/revisions/{revision}&#x60;).
451
+ # @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;).
452
+ # @param [Hash] opts the optional parameters
453
+ # @option opts [ScoreModification] :body
454
+ # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
455
+ def edit_score_with_http_info(score, opts = {})
456
+ if @api_client.config.debugging
457
+ @api_client.config.logger.debug "Calling API: ScoreApi.edit_score ..."
458
+ end
459
+ # verify the required parameter 'score' is set
460
+ if @api_client.config.client_side_validation && score.nil?
461
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.edit_score"
462
+ end
463
+ # resource path
464
+ local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)
465
+
466
+ # query parameters
467
+ query_params = {}
468
+
469
+ # header parameters
470
+ header_params = {}
471
+ # HTTP header 'Accept' (if needed)
472
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
473
+ # HTTP header 'Content-Type'
474
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
475
+
476
+ # form parameters
477
+ form_params = {}
478
+
479
+ # http body (model)
480
+ post_body = @api_client.object_to_http_body(opts[:'body'])
481
+ auth_names = ['OAuth2']
482
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
483
+ :header_params => header_params,
484
+ :query_params => query_params,
485
+ :form_params => form_params,
486
+ :body => post_body,
487
+ :auth_names => auth_names,
488
+ :return_type => 'ScoreDetails')
489
+ if @api_client.config.debugging
490
+ @api_client.config.logger.debug "API called: ScoreApi#edit_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
491
+ end
492
+ return data, status_code, headers
493
+ end
494
+
495
+ # Fork a score
496
+ # This API call will make a copy of the last revision of the specified score and create a new score. The copy of the score will have a privacy set to `private`. When using a [Flat for Education](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document.
497
+ # @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;).
498
+ # @param body
499
+ # @param [Hash] opts the optional parameters
500
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
501
+ # @return [ScoreDetails]
502
+ def fork_score(score, body, opts = {})
503
+ data, _status_code, _headers = fork_score_with_http_info(score, body, opts)
504
+ return data
505
+ end
506
+
507
+ # Fork a score
508
+ # This API call will make a copy of the last revision of the specified score and create a new score. The copy of the score will have a privacy set to &#x60;private&#x60;. When using a [Flat for Education](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document.
509
+ # @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;).
510
+ # @param body
511
+ # @param [Hash] opts the optional parameters
512
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
513
+ # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
514
+ def fork_score_with_http_info(score, body, opts = {})
515
+ if @api_client.config.debugging
516
+ @api_client.config.logger.debug "Calling API: ScoreApi.fork_score ..."
517
+ end
518
+ # verify the required parameter 'score' is set
519
+ if @api_client.config.client_side_validation && score.nil?
520
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.fork_score"
521
+ end
522
+ # verify the required parameter 'body' is set
523
+ if @api_client.config.client_side_validation && body.nil?
524
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.fork_score"
525
+ end
526
+ # resource path
527
+ local_var_path = "/scores/{score}/fork".sub('{' + 'score' + '}', score.to_s)
528
+
529
+ # query parameters
530
+ query_params = {}
531
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
532
+
533
+ # header parameters
534
+ header_params = {}
535
+ # HTTP header 'Accept' (if needed)
536
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
537
+ # HTTP header 'Content-Type'
538
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
539
+
540
+ # form parameters
541
+ form_params = {}
542
+
543
+ # http body (model)
544
+ post_body = @api_client.object_to_http_body(body)
545
+ auth_names = ['OAuth2']
546
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
547
+ :header_params => header_params,
548
+ :query_params => query_params,
549
+ :form_params => form_params,
550
+ :body => post_body,
551
+ :auth_names => auth_names,
552
+ :return_type => 'ScoreDetails')
553
+ if @api_client.config.debugging
554
+ @api_client.config.logger.debug "API called: ScoreApi#fork_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
555
+ end
556
+ return data, status_code, headers
557
+ end
558
+
559
+ # List liked scores
560
+ #
561
+ # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
562
+ # @param [Hash] opts the optional parameters
563
+ # @option opts [BOOLEAN] :ids Return only the identifiers of the scores
564
+ # @return [Array<ScoreDetails>]
565
+ def ger_user_likes(user, opts = {})
566
+ data, _status_code, _headers = ger_user_likes_with_http_info(user, opts)
567
+ return data
568
+ end
569
+
570
+ # List liked scores
571
+ #
572
+ # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
573
+ # @param [Hash] opts the optional parameters
574
+ # @option opts [BOOLEAN] :ids Return only the identifiers of the scores
575
+ # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
576
+ def ger_user_likes_with_http_info(user, opts = {})
577
+ if @api_client.config.debugging
578
+ @api_client.config.logger.debug "Calling API: ScoreApi.ger_user_likes ..."
579
+ end
580
+ # verify the required parameter 'user' is set
581
+ if @api_client.config.client_side_validation && user.nil?
582
+ fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.ger_user_likes"
583
+ end
584
+ # resource path
585
+ local_var_path = "/users/{user}/likes".sub('{' + 'user' + '}', user.to_s)
586
+
587
+ # query parameters
588
+ query_params = {}
589
+ query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
590
+
591
+ # header parameters
592
+ header_params = {}
593
+ # HTTP header 'Accept' (if needed)
594
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
595
+ # HTTP header 'Content-Type'
596
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
597
+
598
+ # form parameters
599
+ form_params = {}
600
+
601
+ # http body (model)
602
+ post_body = nil
603
+ auth_names = ['OAuth2']
604
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
605
+ :header_params => header_params,
606
+ :query_params => query_params,
607
+ :form_params => form_params,
608
+ :body => post_body,
609
+ :auth_names => auth_names,
610
+ :return_type => 'Array<ScoreDetails>')
611
+ if @api_client.config.debugging
612
+ @api_client.config.logger.debug "API called: ScoreApi#ger_user_likes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
613
+ end
614
+ return data, status_code, headers
615
+ end
616
+
617
+ # List group's scores
618
+ # Get the list of scores shared with a group.
619
+ # @param group Unique identifier of a Flat group
620
+ # @param [Hash] opts the optional parameters
621
+ # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
622
+ # @return [Array<ScoreDetails>]
623
+ def get_group_scores(group, opts = {})
624
+ data, _status_code, _headers = get_group_scores_with_http_info(group, opts)
625
+ return data
626
+ end
627
+
628
+ # List group&#39;s scores
629
+ # Get the list of scores shared with a group.
630
+ # @param group Unique identifier of a Flat group
631
+ # @param [Hash] opts the optional parameters
632
+ # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
633
+ # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
634
+ def get_group_scores_with_http_info(group, opts = {})
635
+ if @api_client.config.debugging
636
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_group_scores ..."
637
+ end
638
+ # verify the required parameter 'group' is set
639
+ if @api_client.config.client_side_validation && group.nil?
640
+ fail ArgumentError, "Missing the required parameter 'group' when calling ScoreApi.get_group_scores"
641
+ end
642
+ # resource path
643
+ local_var_path = "/groups/{group}/scores".sub('{' + 'group' + '}', group.to_s)
644
+
645
+ # query parameters
646
+ query_params = {}
647
+ query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
648
+
649
+ # header parameters
650
+ header_params = {}
651
+ # HTTP header 'Accept' (if needed)
652
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
653
+ # HTTP header 'Content-Type'
654
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
655
+
656
+ # form parameters
657
+ form_params = {}
658
+
659
+ # http body (model)
660
+ post_body = nil
661
+ auth_names = ['OAuth2']
662
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
663
+ :header_params => header_params,
664
+ :query_params => query_params,
665
+ :form_params => form_params,
666
+ :body => post_body,
667
+ :auth_names => auth_names,
668
+ :return_type => 'Array<ScoreDetails>')
669
+ if @api_client.config.debugging
670
+ @api_client.config.logger.debug "API called: ScoreApi#get_group_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
671
+ end
672
+ return data, status_code, headers
673
+ end
674
+
675
+ # Get a score's metadata
676
+ # Get the details of a score identified by the `score` parameter in the URL. The currently authenticated user must have at least a read access to the document to use this API call.
677
+ # @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;).
678
+ # @param [Hash] opts the optional parameters
679
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
680
+ # @return [ScoreDetails]
681
+ def get_score(score, opts = {})
682
+ data, _status_code, _headers = get_score_with_http_info(score, opts)
683
+ return data
684
+ end
685
+
686
+ # Get a score&#39;s metadata
687
+ # Get the details of a score identified by the &#x60;score&#x60; parameter in the URL. The currently authenticated user must have at least a read access to the document to use this API call.
688
+ # @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;).
689
+ # @param [Hash] opts the optional parameters
690
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
691
+ # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
692
+ def get_score_with_http_info(score, opts = {})
693
+ if @api_client.config.debugging
694
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_score ..."
695
+ end
696
+ # verify the required parameter 'score' is set
697
+ if @api_client.config.client_side_validation && score.nil?
698
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score"
699
+ end
700
+ # resource path
701
+ local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)
702
+
703
+ # query parameters
704
+ query_params = {}
705
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
706
+
707
+ # header parameters
708
+ header_params = {}
709
+ # HTTP header 'Accept' (if needed)
710
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
711
+ # HTTP header 'Content-Type'
712
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
713
+
714
+ # form parameters
715
+ form_params = {}
716
+
717
+ # http body (model)
718
+ post_body = nil
719
+ auth_names = ['OAuth2']
720
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
721
+ :header_params => header_params,
722
+ :query_params => query_params,
723
+ :form_params => form_params,
724
+ :body => post_body,
725
+ :auth_names => auth_names,
726
+ :return_type => 'ScoreDetails')
727
+ if @api_client.config.debugging
728
+ @api_client.config.logger.debug "API called: ScoreApi#get_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
729
+ end
730
+ return data, status_code, headers
731
+ end
732
+
733
+ # Get a collaborator
734
+ # Get the information about a collaborator (User or Group).
735
+ # @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;).
736
+ # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
737
+ # @param [Hash] opts the optional parameters
738
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
739
+ # @return [ScoreCollaborator]
740
+ def get_score_collaborator(score, collaborator, opts = {})
741
+ data, _status_code, _headers = get_score_collaborator_with_http_info(score, collaborator, opts)
742
+ return data
743
+ end
744
+
745
+ # Get a collaborator
746
+ # Get the information about a collaborator (User or Group).
747
+ # @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;).
748
+ # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
749
+ # @param [Hash] opts the optional parameters
750
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
751
+ # @return [Array<(ScoreCollaborator, Fixnum, Hash)>] ScoreCollaborator data, response status code and response headers
752
+ def get_score_collaborator_with_http_info(score, collaborator, opts = {})
753
+ if @api_client.config.debugging
754
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborator ..."
755
+ end
756
+ # verify the required parameter 'score' is set
757
+ if @api_client.config.client_side_validation && score.nil?
758
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_collaborator"
759
+ end
760
+ # verify the required parameter 'collaborator' is set
761
+ if @api_client.config.client_side_validation && collaborator.nil?
762
+ fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.get_score_collaborator"
763
+ end
764
+ # resource path
765
+ local_var_path = "/scores/{score}/collaborators/{collaborator}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'collaborator' + '}', collaborator.to_s)
766
+
767
+ # query parameters
768
+ query_params = {}
769
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
770
+
771
+ # header parameters
772
+ header_params = {}
773
+ # HTTP header 'Accept' (if needed)
774
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
775
+ # HTTP header 'Content-Type'
776
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
777
+
778
+ # form parameters
779
+ form_params = {}
780
+
781
+ # http body (model)
782
+ post_body = nil
783
+ auth_names = ['OAuth2']
784
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
785
+ :header_params => header_params,
786
+ :query_params => query_params,
787
+ :form_params => form_params,
788
+ :body => post_body,
789
+ :auth_names => auth_names,
790
+ :return_type => 'ScoreCollaborator')
791
+ if @api_client.config.debugging
792
+ @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
793
+ end
794
+ return data, status_code, headers
795
+ end
796
+
797
+ # List the collaborators
798
+ # This API call will list the different collaborators of a score and their rights on the document. The returned list will at least contain the owner of the document. Collaborators can be a single user (the object `user` will be populated) or a group (the object `group` will be populated).
799
+ # @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;).
800
+ # @param [Hash] opts the optional parameters
801
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
802
+ # @return [Array<ScoreCollaborator>]
803
+ def get_score_collaborators(score, opts = {})
804
+ data, _status_code, _headers = get_score_collaborators_with_http_info(score, opts)
805
+ return data
806
+ end
807
+
808
+ # List the collaborators
809
+ # This API call will list the different collaborators of a score and their rights on the document. The returned list will at least contain the owner of the document. Collaborators can be a single user (the object &#x60;user&#x60; will be populated) or a group (the object &#x60;group&#x60; will be populated).
810
+ # @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;).
811
+ # @param [Hash] opts the optional parameters
812
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
813
+ # @return [Array<(Array<ScoreCollaborator>, Fixnum, Hash)>] Array<ScoreCollaborator> data, response status code and response headers
814
+ def get_score_collaborators_with_http_info(score, opts = {})
815
+ if @api_client.config.debugging
816
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborators ..."
817
+ end
818
+ # verify the required parameter 'score' is set
819
+ if @api_client.config.client_side_validation && score.nil?
820
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_collaborators"
821
+ end
822
+ # resource path
823
+ local_var_path = "/scores/{score}/collaborators".sub('{' + 'score' + '}', score.to_s)
824
+
825
+ # query parameters
826
+ query_params = {}
827
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
828
+
829
+ # header parameters
830
+ header_params = {}
831
+ # HTTP header 'Accept' (if needed)
832
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
833
+ # HTTP header 'Content-Type'
834
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
835
+
836
+ # form parameters
837
+ form_params = {}
838
+
839
+ # http body (model)
840
+ post_body = nil
841
+ auth_names = ['OAuth2']
842
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
843
+ :header_params => header_params,
844
+ :query_params => query_params,
845
+ :form_params => form_params,
846
+ :body => post_body,
847
+ :auth_names => auth_names,
848
+ :return_type => 'Array<ScoreCollaborator>')
849
+ if @api_client.config.debugging
850
+ @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
851
+ end
852
+ return data, status_code, headers
853
+ end
854
+
855
+ # List comments
856
+ # This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
857
+ # @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;).
858
+ # @param [Hash] opts the optional parameters
859
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
860
+ # @return [Array<ScoreComment>]
861
+ def get_score_comments(score, opts = {})
862
+ data, _status_code, _headers = get_score_comments_with_http_info(score, opts)
863
+ return data
864
+ end
865
+
866
+ # List comments
867
+ # This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
868
+ # @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;).
869
+ # @param [Hash] opts the optional parameters
870
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
871
+ # @return [Array<(Array<ScoreComment>, Fixnum, Hash)>] Array<ScoreComment> data, response status code and response headers
872
+ def get_score_comments_with_http_info(score, opts = {})
873
+ if @api_client.config.debugging
874
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_score_comments ..."
875
+ end
876
+ # verify the required parameter 'score' is set
877
+ if @api_client.config.client_side_validation && score.nil?
878
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_comments"
879
+ end
880
+ # resource path
881
+ local_var_path = "/scores/{score}/comments".sub('{' + 'score' + '}', score.to_s)
882
+
883
+ # query parameters
884
+ query_params = {}
885
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
886
+
887
+ # header parameters
888
+ header_params = {}
889
+ # HTTP header 'Accept' (if needed)
890
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
891
+ # HTTP header 'Content-Type'
892
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
893
+
894
+ # form parameters
895
+ form_params = {}
896
+
897
+ # http body (model)
898
+ post_body = nil
899
+ auth_names = ['OAuth2']
900
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
901
+ :header_params => header_params,
902
+ :query_params => query_params,
903
+ :form_params => form_params,
904
+ :body => post_body,
905
+ :auth_names => auth_names,
906
+ :return_type => 'Array<ScoreComment>')
907
+ if @api_client.config.debugging
908
+ @api_client.config.logger.debug "API called: ScoreApi#get_score_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
909
+ end
910
+ return data, status_code, headers
911
+ end
912
+
913
+ # Get a score revision
914
+ # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata.
915
+ # @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;).
916
+ # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
917
+ # @param [Hash] opts the optional parameters
918
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
919
+ # @return [ScoreRevision]
920
+ def get_score_revision(score, revision, opts = {})
921
+ data, _status_code, _headers = get_score_revision_with_http_info(score, revision, opts)
922
+ return data
923
+ end
924
+
925
+ # Get a score revision
926
+ # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata.
927
+ # @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;).
928
+ # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
929
+ # @param [Hash] opts the optional parameters
930
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
931
+ # @return [Array<(ScoreRevision, Fixnum, Hash)>] ScoreRevision data, response status code and response headers
932
+ def get_score_revision_with_http_info(score, revision, opts = {})
933
+ if @api_client.config.debugging
934
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revision ..."
935
+ end
936
+ # verify the required parameter 'score' is set
937
+ if @api_client.config.client_side_validation && score.nil?
938
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revision"
939
+ end
940
+ # verify the required parameter 'revision' is set
941
+ if @api_client.config.client_side_validation && revision.nil?
942
+ fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.get_score_revision"
943
+ end
944
+ # resource path
945
+ local_var_path = "/scores/{score}/revisions/{revision}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'revision' + '}', revision.to_s)
946
+
947
+ # query parameters
948
+ query_params = {}
949
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
950
+
951
+ # header parameters
952
+ header_params = {}
953
+ # HTTP header 'Accept' (if needed)
954
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
955
+ # HTTP header 'Content-Type'
956
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
957
+
958
+ # form parameters
959
+ form_params = {}
960
+
961
+ # http body (model)
962
+ post_body = nil
963
+ auth_names = ['OAuth2']
964
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
965
+ :header_params => header_params,
966
+ :query_params => query_params,
967
+ :form_params => form_params,
968
+ :body => post_body,
969
+ :auth_names => auth_names,
970
+ :return_type => 'ScoreRevision')
971
+ if @api_client.config.debugging
972
+ @api_client.config.logger.debug "API called: ScoreApi#get_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
973
+ end
974
+ return data, status_code, headers
975
+ end
976
+
977
+ # Get a score revision data
978
+ # Retrieve the file corresponding to a score revision (the following formats are available: Flat JSON/Adagio JSON `json`, MusicXML `mxl`/`xml`, MP3 `mp3`, WAV `wav`, MIDI `midi`, or a tumbnail of the first page `thumbnail.png`).
979
+ # @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;).
980
+ # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
981
+ # @param format The format of the file you will retrieve
982
+ # @param [Hash] opts the optional parameters
983
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
984
+ # @option opts [BOOLEAN] :only_cached Only return files already generated and cached in Flat&#39;s production cache. If the file is not availabe, a 404 will be returned
985
+ # @option opts [String] :parts An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example \&quot;1,2,5\&quot;.
986
+ # @return [String]
987
+ def get_score_revision_data(score, revision, format, opts = {})
988
+ data, _status_code, _headers = get_score_revision_data_with_http_info(score, revision, format, opts)
989
+ return data
990
+ end
991
+
992
+ # Get a score revision data
993
+ # Retrieve the file corresponding to a score revision (the following formats are available: Flat JSON/Adagio JSON &#x60;json&#x60;, MusicXML &#x60;mxl&#x60;/&#x60;xml&#x60;, MP3 &#x60;mp3&#x60;, WAV &#x60;wav&#x60;, MIDI &#x60;midi&#x60;, or a tumbnail of the first page &#x60;thumbnail.png&#x60;).
994
+ # @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;).
995
+ # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
996
+ # @param format The format of the file you will retrieve
997
+ # @param [Hash] opts the optional parameters
998
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
999
+ # @option opts [BOOLEAN] :only_cached Only return files already generated and cached in Flat&#39;s production cache. If the file is not availabe, a 404 will be returned
1000
+ # @option opts [String] :parts An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example \&quot;1,2,5\&quot;.
1001
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
1002
+ def get_score_revision_data_with_http_info(score, revision, format, opts = {})
1003
+ if @api_client.config.debugging
1004
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revision_data ..."
1005
+ end
1006
+ # verify the required parameter 'score' is set
1007
+ if @api_client.config.client_side_validation && score.nil?
1008
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revision_data"
1009
+ end
1010
+ # verify the required parameter 'revision' is set
1011
+ if @api_client.config.client_side_validation && revision.nil?
1012
+ fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.get_score_revision_data"
1013
+ end
1014
+ # verify the required parameter 'format' is set
1015
+ if @api_client.config.client_side_validation && format.nil?
1016
+ fail ArgumentError, "Missing the required parameter 'format' when calling ScoreApi.get_score_revision_data"
1017
+ end
1018
+ # verify enum value
1019
+ if @api_client.config.client_side_validation && !['json', 'mxl', 'xml', 'mp3', 'wav', 'midi', 'thumbnail.png'].include?(format)
1020
+ fail ArgumentError, "invalid value for 'format', must be one of json, mxl, xml, mp3, wav, midi, thumbnail.png"
1021
+ end
1022
+ # resource path
1023
+ local_var_path = "/scores/{score}/revisions/{revision}/{format}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'revision' + '}', revision.to_s).sub('{' + 'format' + '}', format.to_s)
1024
+
1025
+ # query parameters
1026
+ query_params = {}
1027
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1028
+ query_params[:'onlyCached'] = opts[:'only_cached'] if !opts[:'only_cached'].nil?
1029
+ query_params[:'parts'] = opts[:'parts'] if !opts[:'parts'].nil?
1030
+
1031
+ # header parameters
1032
+ header_params = {}
1033
+ # HTTP header 'Accept' (if needed)
1034
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png'])
1035
+ # HTTP header 'Content-Type'
1036
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1037
+
1038
+ # form parameters
1039
+ form_params = {}
1040
+
1041
+ # http body (model)
1042
+ post_body = nil
1043
+ auth_names = ['OAuth2']
1044
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1045
+ :header_params => header_params,
1046
+ :query_params => query_params,
1047
+ :form_params => form_params,
1048
+ :body => post_body,
1049
+ :auth_names => auth_names,
1050
+ :return_type => 'String')
1051
+ if @api_client.config.debugging
1052
+ @api_client.config.logger.debug "API called: ScoreApi#get_score_revision_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1053
+ end
1054
+ return data, status_code, headers
1055
+ end
1056
+
1057
+ # List the revisions
1058
+ # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to list all of them, sorted by last modification. Depending the plan of the account, this list can be trunked to the few last revisions.
1059
+ # @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;).
1060
+ # @param [Hash] opts the optional parameters
1061
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1062
+ # @return [Array<ScoreRevision>]
1063
+ def get_score_revisions(score, opts = {})
1064
+ data, _status_code, _headers = get_score_revisions_with_http_info(score, opts)
1065
+ return data
1066
+ end
1067
+
1068
+ # List the revisions
1069
+ # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to list all of them, sorted by last modification. Depending the plan of the account, this list can be trunked to the few last revisions.
1070
+ # @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;).
1071
+ # @param [Hash] opts the optional parameters
1072
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1073
+ # @return [Array<(Array<ScoreRevision>, Fixnum, Hash)>] Array<ScoreRevision> data, response status code and response headers
1074
+ def get_score_revisions_with_http_info(score, opts = {})
1075
+ if @api_client.config.debugging
1076
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revisions ..."
1077
+ end
1078
+ # verify the required parameter 'score' is set
1079
+ if @api_client.config.client_side_validation && score.nil?
1080
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revisions"
1081
+ end
1082
+ # resource path
1083
+ local_var_path = "/scores/{score}/revisions".sub('{' + 'score' + '}', score.to_s)
1084
+
1085
+ # query parameters
1086
+ query_params = {}
1087
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1088
+
1089
+ # header parameters
1090
+ header_params = {}
1091
+ # HTTP header 'Accept' (if needed)
1092
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1093
+ # HTTP header 'Content-Type'
1094
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1095
+
1096
+ # form parameters
1097
+ form_params = {}
1098
+
1099
+ # http body (model)
1100
+ post_body = nil
1101
+ auth_names = ['OAuth2']
1102
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1103
+ :header_params => header_params,
1104
+ :query_params => query_params,
1105
+ :form_params => form_params,
1106
+ :body => post_body,
1107
+ :auth_names => auth_names,
1108
+ :return_type => 'Array<ScoreRevision>')
1109
+ if @api_client.config.debugging
1110
+ @api_client.config.logger.debug "API called: ScoreApi#get_score_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1111
+ end
1112
+ return data, status_code, headers
1113
+ end
1114
+
1115
+ # List submissions related to the score
1116
+ # 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.
1117
+ # @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;).
1118
+ # @param [Hash] opts the optional parameters
1119
+ # @return [Array<AssignmentSubmission>]
1120
+ def get_score_submissions(score, opts = {})
1121
+ data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
1122
+ return data
1123
+ end
1124
+
1125
+ # List submissions related to the score
1126
+ # 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.
1127
+ # @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;).
1128
+ # @param [Hash] opts the optional parameters
1129
+ # @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
1130
+ def get_score_submissions_with_http_info(score, opts = {})
1131
+ if @api_client.config.debugging
1132
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_score_submissions ..."
1133
+ end
1134
+ # verify the required parameter 'score' is set
1135
+ if @api_client.config.client_side_validation && score.nil?
1136
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_submissions"
1137
+ end
1138
+ # resource path
1139
+ local_var_path = "/scores/{score}/submissions".sub('{' + 'score' + '}', score.to_s)
1140
+
1141
+ # query parameters
1142
+ query_params = {}
1143
+
1144
+ # header parameters
1145
+ header_params = {}
1146
+ # HTTP header 'Accept' (if needed)
1147
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1148
+ # HTTP header 'Content-Type'
1149
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1150
+
1151
+ # form parameters
1152
+ form_params = {}
1153
+
1154
+ # http body (model)
1155
+ post_body = nil
1156
+ auth_names = ['OAuth2']
1157
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1158
+ :header_params => header_params,
1159
+ :query_params => query_params,
1160
+ :form_params => form_params,
1161
+ :body => post_body,
1162
+ :auth_names => auth_names,
1163
+ :return_type => 'Array<AssignmentSubmission>')
1164
+ if @api_client.config.debugging
1165
+ @api_client.config.logger.debug "API called: ScoreApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1166
+ end
1167
+ return data, status_code, headers
1168
+ end
1169
+
1170
+ # Retrieve the details of an audio or video track linked to a score
1171
+ #
1172
+ # @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;).
1173
+ # @param track Unique identifier of a score audio track
1174
+ # @param [Hash] opts the optional parameters
1175
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1176
+ # @return [ScoreTrack]
1177
+ def get_score_track(score, track, opts = {})
1178
+ data, _status_code, _headers = get_score_track_with_http_info(score, track, opts)
1179
+ return data
1180
+ end
1181
+
1182
+ # Retrieve the details of an audio or video track linked to a score
1183
+ #
1184
+ # @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;).
1185
+ # @param track Unique identifier of a score audio track
1186
+ # @param [Hash] opts the optional parameters
1187
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1188
+ # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
1189
+ def get_score_track_with_http_info(score, track, opts = {})
1190
+ if @api_client.config.debugging
1191
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_score_track ..."
1192
+ end
1193
+ # verify the required parameter 'score' is set
1194
+ if @api_client.config.client_side_validation && score.nil?
1195
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_track"
1196
+ end
1197
+ # verify the required parameter 'track' is set
1198
+ if @api_client.config.client_side_validation && track.nil?
1199
+ fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.get_score_track"
1200
+ end
1201
+ # resource path
1202
+ local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)
1203
+
1204
+ # query parameters
1205
+ query_params = {}
1206
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1207
+
1208
+ # header parameters
1209
+ header_params = {}
1210
+ # HTTP header 'Accept' (if needed)
1211
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1212
+ # HTTP header 'Content-Type'
1213
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1214
+
1215
+ # form parameters
1216
+ form_params = {}
1217
+
1218
+ # http body (model)
1219
+ post_body = nil
1220
+ auth_names = ['OAuth2']
1221
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1222
+ :header_params => header_params,
1223
+ :query_params => query_params,
1224
+ :form_params => form_params,
1225
+ :body => post_body,
1226
+ :auth_names => auth_names,
1227
+ :return_type => 'ScoreTrack')
1228
+ if @api_client.config.debugging
1229
+ @api_client.config.logger.debug "API called: ScoreApi#get_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1230
+ end
1231
+ return data, status_code, headers
1232
+ end
1233
+
1234
+ # List user's scores
1235
+ # Get the list of scores owned by the User
1236
+ # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1237
+ # @param [Hash] opts the optional parameters
1238
+ # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
1239
+ # @return [Array<ScoreDetails>]
1240
+ def get_user_scores(user, opts = {})
1241
+ data, _status_code, _headers = get_user_scores_with_http_info(user, opts)
1242
+ return data
1243
+ end
1244
+
1245
+ # List user&#39;s scores
1246
+ # Get the list of scores owned by the User
1247
+ # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1248
+ # @param [Hash] opts the optional parameters
1249
+ # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
1250
+ # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
1251
+ def get_user_scores_with_http_info(user, opts = {})
1252
+ if @api_client.config.debugging
1253
+ @api_client.config.logger.debug "Calling API: ScoreApi.get_user_scores ..."
1254
+ end
1255
+ # verify the required parameter 'user' is set
1256
+ if @api_client.config.client_side_validation && user.nil?
1257
+ fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_scores"
1258
+ end
1259
+ # resource path
1260
+ local_var_path = "/users/{user}/scores".sub('{' + 'user' + '}', user.to_s)
1261
+
1262
+ # query parameters
1263
+ query_params = {}
1264
+ query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
1265
+
1266
+ # header parameters
1267
+ header_params = {}
1268
+ # HTTP header 'Accept' (if needed)
1269
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1270
+ # HTTP header 'Content-Type'
1271
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1272
+
1273
+ # form parameters
1274
+ form_params = {}
1275
+
1276
+ # http body (model)
1277
+ post_body = nil
1278
+ auth_names = ['OAuth2']
1279
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1280
+ :header_params => header_params,
1281
+ :query_params => query_params,
1282
+ :form_params => form_params,
1283
+ :body => post_body,
1284
+ :auth_names => auth_names,
1285
+ :return_type => 'Array<ScoreDetails>')
1286
+ if @api_client.config.debugging
1287
+ @api_client.config.logger.debug "API called: ScoreApi#get_user_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1288
+ end
1289
+ return data, status_code, headers
1290
+ end
1291
+
1292
+ # List the audio or video tracks linked to a score
1293
+ #
1294
+ # @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;).
1295
+ # @param [Hash] opts the optional parameters
1296
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1297
+ # @return [Array<ScoreTrack>]
1298
+ def list_score_tracks(score, opts = {})
1299
+ data, _status_code, _headers = list_score_tracks_with_http_info(score, opts)
1300
+ return data
1301
+ end
1302
+
1303
+ # List the audio or video tracks linked to a score
1304
+ #
1305
+ # @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;).
1306
+ # @param [Hash] opts the optional parameters
1307
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1308
+ # @return [Array<(Array<ScoreTrack>, Fixnum, Hash)>] Array<ScoreTrack> data, response status code and response headers
1309
+ def list_score_tracks_with_http_info(score, opts = {})
1310
+ if @api_client.config.debugging
1311
+ @api_client.config.logger.debug "Calling API: ScoreApi.list_score_tracks ..."
1312
+ end
1313
+ # verify the required parameter 'score' is set
1314
+ if @api_client.config.client_side_validation && score.nil?
1315
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.list_score_tracks"
1316
+ end
1317
+ # resource path
1318
+ local_var_path = "/scores/{score}/tracks".sub('{' + 'score' + '}', score.to_s)
1319
+
1320
+ # query parameters
1321
+ query_params = {}
1322
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1323
+
1324
+ # header parameters
1325
+ header_params = {}
1326
+ # HTTP header 'Accept' (if needed)
1327
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1328
+ # HTTP header 'Content-Type'
1329
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1330
+
1331
+ # form parameters
1332
+ form_params = {}
1333
+
1334
+ # http body (model)
1335
+ post_body = nil
1336
+ auth_names = ['OAuth2']
1337
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1338
+ :header_params => header_params,
1339
+ :query_params => query_params,
1340
+ :form_params => form_params,
1341
+ :body => post_body,
1342
+ :auth_names => auth_names,
1343
+ :return_type => 'Array<ScoreTrack>')
1344
+ if @api_client.config.debugging
1345
+ @api_client.config.logger.debug "API called: ScoreApi#list_score_tracks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1346
+ end
1347
+ return data, status_code, headers
1348
+ end
1349
+
1350
+ # Mark the comment as resolved
1351
+ #
1352
+ # @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;).
1353
+ # @param comment Unique identifier of a sheet music comment
1354
+ # @param [Hash] opts the optional parameters
1355
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1356
+ # @return [nil]
1357
+ def mark_score_comment_resolved(score, comment, opts = {})
1358
+ mark_score_comment_resolved_with_http_info(score, comment, opts)
1359
+ return nil
1360
+ end
1361
+
1362
+ # Mark the comment as resolved
1363
+ #
1364
+ # @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;).
1365
+ # @param comment Unique identifier of a sheet music comment
1366
+ # @param [Hash] opts the optional parameters
1367
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1368
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1369
+ def mark_score_comment_resolved_with_http_info(score, comment, opts = {})
1370
+ if @api_client.config.debugging
1371
+ @api_client.config.logger.debug "Calling API: ScoreApi.mark_score_comment_resolved ..."
1372
+ end
1373
+ # verify the required parameter 'score' is set
1374
+ if @api_client.config.client_side_validation && score.nil?
1375
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.mark_score_comment_resolved"
1376
+ end
1377
+ # verify the required parameter 'comment' is set
1378
+ if @api_client.config.client_side_validation && comment.nil?
1379
+ fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_resolved"
1380
+ end
1381
+ # resource path
1382
+ local_var_path = "/scores/{score}/comments/{comment}/resolved".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
1383
+
1384
+ # query parameters
1385
+ query_params = {}
1386
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1387
+
1388
+ # header parameters
1389
+ header_params = {}
1390
+ # HTTP header 'Accept' (if needed)
1391
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1392
+ # HTTP header 'Content-Type'
1393
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1394
+
1395
+ # form parameters
1396
+ form_params = {}
1397
+
1398
+ # http body (model)
1399
+ post_body = nil
1400
+ auth_names = ['OAuth2']
1401
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1402
+ :header_params => header_params,
1403
+ :query_params => query_params,
1404
+ :form_params => form_params,
1405
+ :body => post_body,
1406
+ :auth_names => auth_names)
1407
+ if @api_client.config.debugging
1408
+ @api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_resolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1409
+ end
1410
+ return data, status_code, headers
1411
+ end
1412
+
1413
+ # Mark the comment as unresolved
1414
+ #
1415
+ # @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;).
1416
+ # @param comment Unique identifier of a sheet music comment
1417
+ # @param [Hash] opts the optional parameters
1418
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1419
+ # @return [nil]
1420
+ def mark_score_comment_unresolved(score, comment, opts = {})
1421
+ mark_score_comment_unresolved_with_http_info(score, comment, opts)
1422
+ return nil
1423
+ end
1424
+
1425
+ # Mark the comment as unresolved
1426
+ #
1427
+ # @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;).
1428
+ # @param comment Unique identifier of a sheet music comment
1429
+ # @param [Hash] opts the optional parameters
1430
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1431
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1432
+ def mark_score_comment_unresolved_with_http_info(score, comment, opts = {})
1433
+ if @api_client.config.debugging
1434
+ @api_client.config.logger.debug "Calling API: ScoreApi.mark_score_comment_unresolved ..."
1435
+ end
1436
+ # verify the required parameter 'score' is set
1437
+ if @api_client.config.client_side_validation && score.nil?
1438
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.mark_score_comment_unresolved"
1439
+ end
1440
+ # verify the required parameter 'comment' is set
1441
+ if @api_client.config.client_side_validation && comment.nil?
1442
+ fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_unresolved"
1443
+ end
1444
+ # resource path
1445
+ local_var_path = "/scores/{score}/comments/{comment}/resolved".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
1446
+
1447
+ # query parameters
1448
+ query_params = {}
1449
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1450
+
1451
+ # header parameters
1452
+ header_params = {}
1453
+ # HTTP header 'Accept' (if needed)
1454
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1455
+ # HTTP header 'Content-Type'
1456
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1457
+
1458
+ # form parameters
1459
+ form_params = {}
1460
+
1461
+ # http body (model)
1462
+ post_body = nil
1463
+ auth_names = ['OAuth2']
1464
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1465
+ :header_params => header_params,
1466
+ :query_params => query_params,
1467
+ :form_params => form_params,
1468
+ :body => post_body,
1469
+ :auth_names => auth_names)
1470
+ if @api_client.config.debugging
1471
+ @api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_unresolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1472
+ end
1473
+ return data, status_code, headers
1474
+ end
1475
+
1476
+ # Post a new comment
1477
+ # Post a document or a contextualized comment on a document. Please note that this method includes an anti-spam system for public scores. We don't guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`.
1478
+ # @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;).
1479
+ # @param body
1480
+ # @param [Hash] opts the optional parameters
1481
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1482
+ # @return [ScoreComment]
1483
+ def post_score_comment(score, body, opts = {})
1484
+ data, _status_code, _headers = post_score_comment_with_http_info(score, body, opts)
1485
+ return data
1486
+ end
1487
+
1488
+ # Post a new comment
1489
+ # Post a document or a contextualized comment on a document. Please note that this method includes an anti-spam system for public scores. We don&#39;t guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a &#x60;403&#x60; HTTP error and hidden from other users when the &#x60;spam&#x60; property is &#x60;true&#x60;.
1490
+ # @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;).
1491
+ # @param body
1492
+ # @param [Hash] opts the optional parameters
1493
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1494
+ # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
1495
+ def post_score_comment_with_http_info(score, body, opts = {})
1496
+ if @api_client.config.debugging
1497
+ @api_client.config.logger.debug "Calling API: ScoreApi.post_score_comment ..."
1498
+ end
1499
+ # verify the required parameter 'score' is set
1500
+ if @api_client.config.client_side_validation && score.nil?
1501
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.post_score_comment"
1502
+ end
1503
+ # verify the required parameter 'body' is set
1504
+ if @api_client.config.client_side_validation && body.nil?
1505
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.post_score_comment"
1506
+ end
1507
+ # resource path
1508
+ local_var_path = "/scores/{score}/comments".sub('{' + 'score' + '}', score.to_s)
1509
+
1510
+ # query parameters
1511
+ query_params = {}
1512
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1513
+
1514
+ # header parameters
1515
+ header_params = {}
1516
+ # HTTP header 'Accept' (if needed)
1517
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1518
+ # HTTP header 'Content-Type'
1519
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1520
+
1521
+ # form parameters
1522
+ form_params = {}
1523
+
1524
+ # http body (model)
1525
+ post_body = @api_client.object_to_http_body(body)
1526
+ auth_names = ['OAuth2']
1527
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1528
+ :header_params => header_params,
1529
+ :query_params => query_params,
1530
+ :form_params => form_params,
1531
+ :body => post_body,
1532
+ :auth_names => auth_names,
1533
+ :return_type => 'ScoreComment')
1534
+ if @api_client.config.debugging
1535
+ @api_client.config.logger.debug "API called: ScoreApi#post_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1536
+ end
1537
+ return data, status_code, headers
1538
+ end
1539
+
1540
+ # Delete a collaborator
1541
+ # Remove the specified collaborator from the score
1542
+ # @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;).
1543
+ # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1544
+ # @param [Hash] opts the optional parameters
1545
+ # @return [nil]
1546
+ def remove_score_collaborator(score, collaborator, opts = {})
1547
+ remove_score_collaborator_with_http_info(score, collaborator, opts)
1548
+ return nil
1549
+ end
1550
+
1551
+ # Delete a collaborator
1552
+ # Remove the specified collaborator from the score
1553
+ # @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;).
1554
+ # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1555
+ # @param [Hash] opts the optional parameters
1556
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1557
+ def remove_score_collaborator_with_http_info(score, collaborator, opts = {})
1558
+ if @api_client.config.debugging
1559
+ @api_client.config.logger.debug "Calling API: ScoreApi.remove_score_collaborator ..."
1560
+ end
1561
+ # verify the required parameter 'score' is set
1562
+ if @api_client.config.client_side_validation && score.nil?
1563
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.remove_score_collaborator"
1564
+ end
1565
+ # verify the required parameter 'collaborator' is set
1566
+ if @api_client.config.client_side_validation && collaborator.nil?
1567
+ fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.remove_score_collaborator"
1568
+ end
1569
+ # resource path
1570
+ local_var_path = "/scores/{score}/collaborators/{collaborator}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'collaborator' + '}', collaborator.to_s)
1571
+
1572
+ # query parameters
1573
+ query_params = {}
1574
+
1575
+ # header parameters
1576
+ header_params = {}
1577
+ # HTTP header 'Accept' (if needed)
1578
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1579
+ # HTTP header 'Content-Type'
1580
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1581
+
1582
+ # form parameters
1583
+ form_params = {}
1584
+
1585
+ # http body (model)
1586
+ post_body = nil
1587
+ auth_names = ['OAuth2']
1588
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1589
+ :header_params => header_params,
1590
+ :query_params => query_params,
1591
+ :form_params => form_params,
1592
+ :body => post_body,
1593
+ :auth_names => auth_names)
1594
+ if @api_client.config.debugging
1595
+ @api_client.config.logger.debug "API called: ScoreApi#remove_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1596
+ end
1597
+ return data, status_code, headers
1598
+ end
1599
+
1600
+ # Update an existing comment
1601
+ #
1602
+ # @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;).
1603
+ # @param comment Unique identifier of a sheet music comment
1604
+ # @param body
1605
+ # @param [Hash] opts the optional parameters
1606
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1607
+ # @return [ScoreComment]
1608
+ def update_score_comment(score, comment, body, opts = {})
1609
+ data, _status_code, _headers = update_score_comment_with_http_info(score, comment, body, opts)
1610
+ return data
1611
+ end
1612
+
1613
+ # Update an existing comment
1614
+ #
1615
+ # @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;).
1616
+ # @param comment Unique identifier of a sheet music comment
1617
+ # @param body
1618
+ # @param [Hash] opts the optional parameters
1619
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1620
+ # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
1621
+ def update_score_comment_with_http_info(score, comment, body, opts = {})
1622
+ if @api_client.config.debugging
1623
+ @api_client.config.logger.debug "Calling API: ScoreApi.update_score_comment ..."
1624
+ end
1625
+ # verify the required parameter 'score' is set
1626
+ if @api_client.config.client_side_validation && score.nil?
1627
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.update_score_comment"
1628
+ end
1629
+ # verify the required parameter 'comment' is set
1630
+ if @api_client.config.client_side_validation && comment.nil?
1631
+ fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.update_score_comment"
1632
+ end
1633
+ # verify the required parameter 'body' is set
1634
+ if @api_client.config.client_side_validation && body.nil?
1635
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_comment"
1636
+ end
1637
+ # resource path
1638
+ local_var_path = "/scores/{score}/comments/{comment}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
1639
+
1640
+ # query parameters
1641
+ query_params = {}
1642
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1643
+
1644
+ # header parameters
1645
+ header_params = {}
1646
+ # HTTP header 'Accept' (if needed)
1647
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1648
+ # HTTP header 'Content-Type'
1649
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1650
+
1651
+ # form parameters
1652
+ form_params = {}
1653
+
1654
+ # http body (model)
1655
+ post_body = @api_client.object_to_http_body(body)
1656
+ auth_names = ['OAuth2']
1657
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1658
+ :header_params => header_params,
1659
+ :query_params => query_params,
1660
+ :form_params => form_params,
1661
+ :body => post_body,
1662
+ :auth_names => auth_names,
1663
+ :return_type => 'ScoreComment')
1664
+ if @api_client.config.debugging
1665
+ @api_client.config.logger.debug "API called: ScoreApi#update_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1666
+ end
1667
+ return data, status_code, headers
1668
+ end
1669
+
1670
+ # Update an audio or video track linked to a score
1671
+ #
1672
+ # @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;).
1673
+ # @param track Unique identifier of a score audio track
1674
+ # @param body
1675
+ # @param [Hash] opts the optional parameters
1676
+ # @return [ScoreTrack]
1677
+ def update_score_track(score, track, body, opts = {})
1678
+ data, _status_code, _headers = update_score_track_with_http_info(score, track, body, opts)
1679
+ return data
1680
+ end
1681
+
1682
+ # Update an audio or video track linked to a score
1683
+ #
1684
+ # @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;).
1685
+ # @param track Unique identifier of a score audio track
1686
+ # @param body
1687
+ # @param [Hash] opts the optional parameters
1688
+ # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
1689
+ def update_score_track_with_http_info(score, track, body, opts = {})
1690
+ if @api_client.config.debugging
1691
+ @api_client.config.logger.debug "Calling API: ScoreApi.update_score_track ..."
1692
+ end
1693
+ # verify the required parameter 'score' is set
1694
+ if @api_client.config.client_side_validation && score.nil?
1695
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.update_score_track"
1696
+ end
1697
+ # verify the required parameter 'track' is set
1698
+ if @api_client.config.client_side_validation && track.nil?
1699
+ fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.update_score_track"
1700
+ end
1701
+ # verify the required parameter 'body' is set
1702
+ if @api_client.config.client_side_validation && body.nil?
1703
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_track"
1704
+ end
1705
+ # resource path
1706
+ local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)
1707
+
1708
+ # query parameters
1709
+ query_params = {}
1710
+
1711
+ # header parameters
1712
+ header_params = {}
1713
+ # HTTP header 'Accept' (if needed)
1714
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1715
+ # HTTP header 'Content-Type'
1716
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1717
+
1718
+ # form parameters
1719
+ form_params = {}
1720
+
1721
+ # http body (model)
1722
+ post_body = @api_client.object_to_http_body(body)
1723
+ auth_names = ['OAuth2']
1724
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1725
+ :header_params => header_params,
1726
+ :query_params => query_params,
1727
+ :form_params => form_params,
1728
+ :body => post_body,
1729
+ :auth_names => auth_names,
1730
+ :return_type => 'ScoreTrack')
1731
+ if @api_client.config.debugging
1732
+ @api_client.config.logger.debug "API called: ScoreApi#update_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1733
+ end
1734
+ return data, status_code, headers
1735
+ end
1736
+ end
1737
+ end