flat_api 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +34 -12
  4. data/docs/ClassApi.md +2 -2
  5. data/docs/Collection.md +18 -0
  6. data/docs/CollectionApi.md +521 -0
  7. data/docs/CollectionCapabilities.md +12 -0
  8. data/docs/CollectionCreation.md +8 -0
  9. data/docs/CollectionModification.md +8 -0
  10. data/docs/CollectionPrivacy.md +7 -0
  11. data/docs/CollectionTitle.md +7 -0
  12. data/docs/CollectionType.md +7 -0
  13. data/docs/ResourceCollaborator.md +16 -0
  14. data/docs/{ScoreCollaboratorCreation.md → ResourceCollaboratorCreation.md} +2 -1
  15. data/docs/ResourceRights.md +10 -0
  16. data/docs/ResourceSharingKey.md +7 -0
  17. data/docs/ScoreApi.md +144 -91
  18. data/docs/ScoreCreation.md +2 -1
  19. data/docs/ScoreDetails.md +2 -2
  20. data/docs/ScoreFork.md +1 -0
  21. data/docs/ScoreModification.md +2 -1
  22. data/docs/UserApi.md +1 -1
  23. data/flat_api.gemspec +1 -1
  24. data/lib/flat_api.rb +13 -4
  25. data/lib/flat_api/api/account_api.rb +1 -1
  26. data/lib/flat_api/api/class_api.rb +1 -1
  27. data/lib/flat_api/api/collection_api.rb +596 -0
  28. data/lib/flat_api/api/group_api.rb +1 -1
  29. data/lib/flat_api/api/organization_api.rb +1 -1
  30. data/lib/flat_api/api/score_api.rb +125 -53
  31. data/lib/flat_api/api/user_api.rb +3 -3
  32. data/lib/flat_api/api_client.rb +1 -1
  33. data/lib/flat_api/api_error.rb +1 -1
  34. data/lib/flat_api/configuration.rb +1 -1
  35. data/lib/flat_api/models/assignment.rb +1 -1
  36. data/lib/flat_api/models/assignment_copy.rb +1 -1
  37. data/lib/flat_api/models/assignment_creation.rb +1 -1
  38. data/lib/flat_api/models/assignment_submission.rb +1 -1
  39. data/lib/flat_api/models/assignment_submission_update.rb +1 -1
  40. data/lib/flat_api/models/class_attachment_creation.rb +1 -1
  41. data/lib/flat_api/models/class_creation.rb +1 -1
  42. data/lib/flat_api/models/class_details.rb +1 -1
  43. data/lib/flat_api/models/class_details_canvas.rb +1 -1
  44. data/lib/flat_api/models/class_details_clever.rb +1 -1
  45. data/lib/flat_api/models/class_details_google_classroom.rb +1 -1
  46. data/lib/flat_api/models/class_details_google_drive.rb +1 -1
  47. data/lib/flat_api/models/class_details_lti.rb +1 -1
  48. data/lib/flat_api/models/class_roles.rb +1 -1
  49. data/lib/flat_api/models/class_state.rb +1 -1
  50. data/lib/flat_api/models/class_update.rb +1 -1
  51. data/lib/flat_api/models/collection.rb +285 -0
  52. data/lib/flat_api/models/collection_capabilities.rb +229 -0
  53. data/lib/flat_api/models/collection_creation.rb +193 -0
  54. data/lib/flat_api/models/collection_modification.rb +188 -0
  55. data/lib/flat_api/models/collection_privacy.rb +30 -0
  56. data/lib/flat_api/models/collection_title.rb +179 -0
  57. data/lib/flat_api/models/collection_type.rb +34 -0
  58. data/lib/flat_api/models/flat_error_response.rb +1 -1
  59. data/lib/flat_api/models/flat_locales.rb +1 -1
  60. data/lib/flat_api/models/google_classroom_coursework.rb +1 -1
  61. data/lib/flat_api/models/google_classroom_submission.rb +1 -1
  62. data/lib/flat_api/models/group.rb +1 -1
  63. data/lib/flat_api/models/group_details.rb +1 -1
  64. data/lib/flat_api/models/group_type.rb +1 -1
  65. data/lib/flat_api/models/license_mode.rb +1 -1
  66. data/lib/flat_api/models/license_sources.rb +1 -1
  67. data/lib/flat_api/models/lms_name.rb +1 -1
  68. data/lib/flat_api/models/lti_credentials.rb +1 -1
  69. data/lib/flat_api/models/lti_credentials_creation.rb +1 -1
  70. data/lib/flat_api/models/media_attachment.rb +1 -1
  71. data/lib/flat_api/models/media_score_sharing_mode.rb +1 -1
  72. data/lib/flat_api/models/organization_invitation.rb +1 -1
  73. data/lib/flat_api/models/organization_invitation_creation.rb +1 -1
  74. data/lib/flat_api/models/organization_roles.rb +1 -1
  75. data/lib/flat_api/models/{score_collaborator.rb → resource_collaborator.rb} +54 -44
  76. data/lib/flat_api/models/{score_collaborator_creation.rb → resource_collaborator_creation.rb} +14 -4
  77. data/lib/flat_api/models/{score_rights.rb → resource_rights.rb} +6 -6
  78. data/lib/flat_api/models/resource_sharing_key.rb +179 -0
  79. data/lib/flat_api/models/score_comment.rb +1 -1
  80. data/lib/flat_api/models/score_comment_context.rb +1 -1
  81. data/lib/flat_api/models/score_comment_creation.rb +1 -1
  82. data/lib/flat_api/models/score_comment_update.rb +1 -1
  83. data/lib/flat_api/models/score_comments_counts.rb +1 -1
  84. data/lib/flat_api/models/score_creation.rb +13 -3
  85. data/lib/flat_api/models/score_creation_type.rb +1 -1
  86. data/lib/flat_api/models/score_data.rb +1 -1
  87. data/lib/flat_api/models/score_data_encoding.rb +1 -1
  88. data/lib/flat_api/models/score_details.rb +3 -3
  89. data/lib/flat_api/models/score_fork.rb +13 -3
  90. data/lib/flat_api/models/score_license.rb +1 -1
  91. data/lib/flat_api/models/score_likes_counts.rb +1 -1
  92. data/lib/flat_api/models/score_modification.rb +13 -20
  93. data/lib/flat_api/models/score_privacy.rb +1 -1
  94. data/lib/flat_api/models/score_revision.rb +1 -1
  95. data/lib/flat_api/models/score_revision_creation.rb +1 -1
  96. data/lib/flat_api/models/score_revision_statistics.rb +1 -1
  97. data/lib/flat_api/models/score_source.rb +1 -1
  98. data/lib/flat_api/models/score_summary.rb +1 -1
  99. data/lib/flat_api/models/score_track.rb +1 -1
  100. data/lib/flat_api/models/score_track_creation.rb +1 -1
  101. data/lib/flat_api/models/score_track_point.rb +1 -1
  102. data/lib/flat_api/models/score_track_state.rb +1 -1
  103. data/lib/flat_api/models/score_track_type.rb +1 -1
  104. data/lib/flat_api/models/score_track_update.rb +1 -1
  105. data/lib/flat_api/models/score_views_counts.rb +1 -1
  106. data/lib/flat_api/models/user_admin_update.rb +1 -1
  107. data/lib/flat_api/models/user_basics.rb +1 -1
  108. data/lib/flat_api/models/user_creation.rb +1 -1
  109. data/lib/flat_api/models/user_details.rb +1 -1
  110. data/lib/flat_api/models/user_details_admin.rb +1 -1
  111. data/lib/flat_api/models/user_details_admin_license.rb +1 -1
  112. data/lib/flat_api/models/user_instruments.rb +1 -1
  113. data/lib/flat_api/models/user_public.rb +1 -1
  114. data/lib/flat_api/models/user_public_summary.rb +1 -1
  115. data/lib/flat_api/version.rb +2 -2
  116. data/spec/api/account_api_spec.rb +2 -2
  117. data/spec/api/class_api_spec.rb +2 -2
  118. data/spec/api/collection_api_spec.rb +159 -0
  119. data/spec/api/group_api_spec.rb +2 -2
  120. data/spec/api/organization_api_spec.rb +2 -2
  121. data/spec/api/score_api_spec.rb +41 -26
  122. data/spec/api/user_api_spec.rb +3 -3
  123. data/spec/api_client_spec.rb +2 -2
  124. data/spec/configuration_spec.rb +2 -2
  125. data/spec/models/assignment_copy_spec.rb +2 -2
  126. data/spec/models/assignment_creation_spec.rb +2 -2
  127. data/spec/models/assignment_spec.rb +2 -2
  128. data/spec/models/assignment_submission_spec.rb +2 -2
  129. data/spec/models/assignment_submission_update_spec.rb +2 -2
  130. data/spec/models/class_attachment_creation_spec.rb +2 -2
  131. data/spec/models/class_creation_spec.rb +2 -2
  132. data/spec/models/class_details_canvas_spec.rb +2 -2
  133. data/spec/models/class_details_clever_spec.rb +2 -2
  134. data/spec/models/class_details_google_classroom_spec.rb +2 -2
  135. data/spec/models/class_details_google_drive_spec.rb +2 -2
  136. data/spec/models/class_details_lti_spec.rb +2 -2
  137. data/spec/models/class_details_spec.rb +2 -2
  138. data/spec/models/class_roles_spec.rb +2 -2
  139. data/spec/models/class_state_spec.rb +2 -2
  140. data/spec/models/class_update_spec.rb +2 -2
  141. data/spec/models/collection_capabilities_spec.rb +66 -0
  142. data/spec/models/collection_creation_spec.rb +42 -0
  143. data/spec/models/collection_modification_spec.rb +42 -0
  144. data/spec/models/collection_privacy_spec.rb +36 -0
  145. data/spec/models/collection_spec.rb +102 -0
  146. data/spec/models/collection_title_spec.rb +36 -0
  147. data/spec/models/collection_type_spec.rb +36 -0
  148. data/spec/models/flat_error_response_spec.rb +2 -2
  149. data/spec/models/flat_locales_spec.rb +2 -2
  150. data/spec/models/google_classroom_coursework_spec.rb +2 -2
  151. data/spec/models/google_classroom_submission_spec.rb +2 -2
  152. data/spec/models/group_details_spec.rb +2 -2
  153. data/spec/models/group_spec.rb +2 -2
  154. data/spec/models/group_type_spec.rb +2 -2
  155. data/spec/models/license_mode_spec.rb +2 -2
  156. data/spec/models/license_sources_spec.rb +2 -2
  157. data/spec/models/lms_name_spec.rb +2 -2
  158. data/spec/models/lti_credentials_creation_spec.rb +2 -2
  159. data/spec/models/lti_credentials_spec.rb +2 -2
  160. data/spec/models/media_attachment_spec.rb +2 -2
  161. data/spec/models/media_score_sharing_mode_spec.rb +2 -2
  162. data/spec/models/organization_invitation_creation_spec.rb +2 -2
  163. data/spec/models/organization_invitation_spec.rb +2 -2
  164. data/spec/models/organization_roles_spec.rb +2 -2
  165. data/spec/models/{score_collaborator_creation_spec.rb → resource_collaborator_creation_spec.rb} +14 -8
  166. data/spec/models/{score_collaborator_spec.rb → resource_collaborator_spec.rb} +22 -16
  167. data/spec/models/{score_rights_spec.rb → resource_rights_spec.rb} +14 -8
  168. data/spec/models/resource_sharing_key_spec.rb +36 -0
  169. data/spec/models/score_comment_context_spec.rb +2 -2
  170. data/spec/models/score_comment_creation_spec.rb +2 -2
  171. data/spec/models/score_comment_spec.rb +2 -2
  172. data/spec/models/score_comment_update_spec.rb +2 -2
  173. data/spec/models/score_comments_counts_spec.rb +2 -2
  174. data/spec/models/score_creation_spec.rb +8 -2
  175. data/spec/models/score_creation_type_spec.rb +2 -2
  176. data/spec/models/score_data_encoding_spec.rb +2 -2
  177. data/spec/models/score_data_spec.rb +2 -2
  178. data/spec/models/score_details_spec.rb +2 -2
  179. data/spec/models/score_fork_spec.rb +8 -2
  180. data/spec/models/score_license_spec.rb +2 -2
  181. data/spec/models/score_likes_counts_spec.rb +2 -2
  182. data/spec/models/score_modification_spec.rb +8 -2
  183. data/spec/models/score_privacy_spec.rb +2 -2
  184. data/spec/models/score_revision_creation_spec.rb +2 -2
  185. data/spec/models/score_revision_spec.rb +2 -2
  186. data/spec/models/score_revision_statistics_spec.rb +2 -2
  187. data/spec/models/score_source_spec.rb +2 -2
  188. data/spec/models/score_summary_spec.rb +2 -2
  189. data/spec/models/score_track_creation_spec.rb +2 -2
  190. data/spec/models/score_track_point_spec.rb +2 -2
  191. data/spec/models/score_track_spec.rb +2 -2
  192. data/spec/models/score_track_state_spec.rb +2 -2
  193. data/spec/models/score_track_type_spec.rb +2 -2
  194. data/spec/models/score_track_update_spec.rb +2 -2
  195. data/spec/models/score_views_counts_spec.rb +2 -2
  196. data/spec/models/user_admin_update_spec.rb +2 -2
  197. data/spec/models/user_basics_spec.rb +2 -2
  198. data/spec/models/user_creation_spec.rb +2 -2
  199. data/spec/models/user_details_admin_license_spec.rb +2 -2
  200. data/spec/models/user_details_admin_spec.rb +2 -2
  201. data/spec/models/user_details_spec.rb +2 -2
  202. data/spec/models/user_instruments_spec.rb +2 -2
  203. data/spec/models/user_public_spec.rb +2 -2
  204. data/spec/models/user_public_summary_spec.rb +2 -2
  205. data/spec/spec_helper.rb +2 -2
  206. metadata +50 -15
  207. data/docs/ScoreCollaborator.md +0 -15
  208. data/docs/ScoreRights.md +0 -10
  209. data/git_push.sh +0 -55
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -21,22 +21,22 @@ module FlatApi
21
21
  end
22
22
 
23
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.
24
+ # Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify its unique identifier in the `user` property. - To invite an external user to the resource, specify its email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
25
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
26
  # @param body
27
27
  # @param [Hash] opts the optional parameters
28
- # @return [ScoreCollaborator]
28
+ # @return [ResourceCollaborator]
29
29
  def add_score_collaborator(score, body, opts = {})
30
30
  data, _status_code, _headers = add_score_collaborator_with_http_info(score, body, opts)
31
31
  return data
32
32
  end
33
33
 
34
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.
35
+ # Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify its unique identifier in the `user` property. - To invite an external user to the resource, specify its email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
36
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
37
  # @param body
38
38
  # @param [Hash] opts the optional parameters
39
- # @return [Array<(ScoreCollaborator, Fixnum, Hash)>] ScoreCollaborator data, response status code and response headers
39
+ # @return [Array<(ResourceCollaborator, Fixnum, Hash)>] ResourceCollaborator data, response status code and response headers
40
40
  def add_score_collaborator_with_http_info(score, body, opts = {})
41
41
  if @api_client.config.debugging
42
42
  @api_client.config.logger.debug "Calling API: ScoreApi.add_score_collaborator ..."
@@ -74,7 +74,7 @@ module FlatApi
74
74
  :form_params => form_params,
75
75
  :body => post_body,
76
76
  :auth_names => auth_names,
77
- :return_type => 'ScoreCollaborator')
77
+ :return_type => 'ResourceCollaborator')
78
78
  if @api_client.config.debugging
79
79
  @api_client.config.logger.debug "API called: ScoreApi#add_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
80
  end
@@ -143,7 +143,7 @@ module FlatApi
143
143
  end
144
144
 
145
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).
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). If no `collection` is specified, the API will create the score in the most appropriate collection. This can be the `root` collection or a different collection based on the user's settings or API authentication method. If a `collection` is specified and this one has more public privacy settings than the score (e.g. `public` vs `private` for the score), the privacy settings of the created score will be adjusted to the collection ones. You can check the adjusted privacy settings in the returned score `privacy`, and optionally adjust these settings if needed using `PUT /scores/{score}`.
147
147
  # @param body
148
148
  # @param [Hash] opts the optional parameters
149
149
  # @return [ScoreDetails]
@@ -153,7 +153,7 @@ module FlatApi
153
153
  end
154
154
 
155
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).
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). If no &#x60;collection&#x60; is specified, the API will create the score in the most appropriate collection. This can be the &#x60;root&#x60; collection or a different collection based on the user&#39;s settings or API authentication method. If a &#x60;collection&#x60; is specified and this one has more public privacy settings than the score (e.g. &#x60;public&#x60; vs &#x60;private&#x60; for the score), the privacy settings of the created score will be adjusted to the collection ones. You can check the adjusted privacy settings in the returned score &#x60;privacy&#x60;, and optionally adjust these settings if needed using &#x60;PUT /scores/{score}&#x60;.
157
157
  # @param body
158
158
  # @param [Hash] opts the optional parameters
159
159
  # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
@@ -259,7 +259,7 @@ module FlatApi
259
259
  end
260
260
 
261
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.
262
+ # This method can be used by the owner/admin (`aclAdmin` rights) of a score as well as regular collaborators. When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won't be accessible anymore after calling this method and the user's quota will directly be updated. When called by a regular collaborator (`aclRead` / `aclWrite`), the score will be unshared (i.e. removed from the account & own collections).
263
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
264
  # @param [Hash] opts the optional parameters
265
265
  # @return [nil]
@@ -269,7 +269,7 @@ module FlatApi
269
269
  end
270
270
 
271
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.
272
+ # This method can be used by the owner/admin (&#x60;aclAdmin&#x60; rights) of a score as well as regular collaborators. When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won&#39;t be accessible anymore after calling this method and the user&#39;s quota will directly be updated. When called by a regular collaborator (&#x60;aclRead&#x60; / &#x60;aclWrite&#x60;), the score will be unshared (i.e. removed from the account &amp; own collections).
273
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
274
  # @param [Hash] opts the optional parameters
275
275
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
@@ -317,7 +317,7 @@ module FlatApi
317
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
318
  # @param comment Unique identifier of a sheet music comment
319
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.
320
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
321
321
  # @return [nil]
322
322
  def delete_score_comment(score, comment, opts = {})
323
323
  delete_score_comment_with_http_info(score, comment, opts)
@@ -329,7 +329,7 @@ module FlatApi
329
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
330
  # @param comment Unique identifier of a sheet music comment
331
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.
332
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
333
333
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
334
334
  def delete_score_comment_with_http_info(score, comment, opts = {})
335
335
  if @api_client.config.debugging
@@ -436,7 +436,7 @@ module FlatApi
436
436
  end
437
437
 
438
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}`).
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}`). When editing the `title` of the score, the API metadata are updated directly when calling this method, unlike the data itself. The title in the score data will be \"lazy\" updated at the next score save with the editor or our internal save.
440
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
441
  # @param [Hash] opts the optional parameters
442
442
  # @option opts [ScoreModification] :body
@@ -447,7 +447,7 @@ module FlatApi
447
447
  end
448
448
 
449
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;).
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;). When editing the &#x60;title&#x60; of the score, the API metadata are updated directly when calling this method, unlike the data itself. The title in the score data will be \&quot;lazy\&quot; updated at the next score save with the editor or our internal save.
451
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
452
  # @param [Hash] opts the optional parameters
453
453
  # @option opts [ScoreModification] :body
@@ -497,7 +497,7 @@ module FlatApi
497
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
498
  # @param body
499
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.
500
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
501
501
  # @return [ScoreDetails]
502
502
  def fork_score(score, body, opts = {})
503
503
  data, _status_code, _headers = fork_score_with_http_info(score, body, opts)
@@ -509,7 +509,7 @@ module FlatApi
509
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
510
  # @param body
511
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.
512
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
513
513
  # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
514
514
  def fork_score_with_http_info(score, body, opts = {})
515
515
  if @api_client.config.debugging
@@ -676,7 +676,7 @@ module FlatApi
676
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
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
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.
679
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
680
680
  # @return [ScoreDetails]
681
681
  def get_score(score, opts = {})
682
682
  data, _status_code, _headers = get_score_with_http_info(score, opts)
@@ -687,7 +687,7 @@ module FlatApi
687
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
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
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.
690
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
691
691
  # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
692
692
  def get_score_with_http_info(score, opts = {})
693
693
  if @api_client.config.debugging
@@ -735,8 +735,8 @@ module FlatApi
735
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
736
  # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
737
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]
738
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
739
+ # @return [ResourceCollaborator]
740
740
  def get_score_collaborator(score, collaborator, opts = {})
741
741
  data, _status_code, _headers = get_score_collaborator_with_http_info(score, collaborator, opts)
742
742
  return data
@@ -747,8 +747,8 @@ module FlatApi
747
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
748
  # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
749
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
750
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection 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<(ResourceCollaborator, Fixnum, Hash)>] ResourceCollaborator data, response status code and response headers
752
752
  def get_score_collaborator_with_http_info(score, collaborator, opts = {})
753
753
  if @api_client.config.debugging
754
754
  @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborator ..."
@@ -787,7 +787,7 @@ module FlatApi
787
787
  :form_params => form_params,
788
788
  :body => post_body,
789
789
  :auth_names => auth_names,
790
- :return_type => 'ScoreCollaborator')
790
+ :return_type => 'ResourceCollaborator')
791
791
  if @api_client.config.debugging
792
792
  @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
793
793
  end
@@ -798,8 +798,8 @@ module FlatApi
798
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
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
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>]
801
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection 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<ResourceCollaborator>]
803
803
  def get_score_collaborators(score, opts = {})
804
804
  data, _status_code, _headers = get_score_collaborators_with_http_info(score, opts)
805
805
  return data
@@ -809,8 +809,8 @@ module FlatApi
809
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
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
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
812
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection 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<ResourceCollaborator>, Fixnum, Hash)>] Array<ResourceCollaborator> data, response status code and response headers
814
814
  def get_score_collaborators_with_http_info(score, opts = {})
815
815
  if @api_client.config.debugging
816
816
  @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborators ..."
@@ -845,7 +845,7 @@ module FlatApi
845
845
  :form_params => form_params,
846
846
  :body => post_body,
847
847
  :auth_names => auth_names,
848
- :return_type => 'Array<ScoreCollaborator>')
848
+ :return_type => 'Array<ResourceCollaborator>')
849
849
  if @api_client.config.debugging
850
850
  @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
851
851
  end
@@ -856,7 +856,10 @@ module FlatApi
856
856
  # This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
857
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
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.
859
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
860
+ # @option opts [String] :type Filter the comments by type
861
+ # @option opts [String] :sort Sort
862
+ # @option opts [String] :direction Sort direction
860
863
  # @return [Array<ScoreComment>]
861
864
  def get_score_comments(score, opts = {})
862
865
  data, _status_code, _headers = get_score_comments_with_http_info(score, opts)
@@ -867,7 +870,10 @@ module FlatApi
867
870
  # This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
868
871
  # @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
872
  # @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.
873
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
874
+ # @option opts [String] :type Filter the comments by type
875
+ # @option opts [String] :sort Sort
876
+ # @option opts [String] :direction Sort direction
871
877
  # @return [Array<(Array<ScoreComment>, Fixnum, Hash)>] Array<ScoreComment> data, response status code and response headers
872
878
  def get_score_comments_with_http_info(score, opts = {})
873
879
  if @api_client.config.debugging
@@ -877,12 +883,24 @@ module FlatApi
877
883
  if @api_client.config.client_side_validation && score.nil?
878
884
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_comments"
879
885
  end
886
+ if @api_client.config.client_side_validation && opts[:'type'] && !['document', 'inline'].include?(opts[:'type'])
887
+ fail ArgumentError, 'invalid value for "type", must be one of document, inline'
888
+ end
889
+ if @api_client.config.client_side_validation && opts[:'sort'] && !['date'].include?(opts[:'sort'])
890
+ fail ArgumentError, 'invalid value for "sort", must be one of date'
891
+ end
892
+ if @api_client.config.client_side_validation && opts[:'direction'] && !['asc', 'desc'].include?(opts[:'direction'])
893
+ fail ArgumentError, 'invalid value for "direction", must be one of asc, desc'
894
+ end
880
895
  # resource path
881
896
  local_var_path = "/scores/{score}/comments".sub('{' + 'score' + '}', score.to_s)
882
897
 
883
898
  # query parameters
884
899
  query_params = {}
885
900
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
901
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
902
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
903
+ query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
886
904
 
887
905
  # header parameters
888
906
  header_params = {}
@@ -915,7 +933,7 @@ module FlatApi
915
933
  # @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
934
  # @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
935
  # @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.
936
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
919
937
  # @return [ScoreRevision]
920
938
  def get_score_revision(score, revision, opts = {})
921
939
  data, _status_code, _headers = get_score_revision_with_http_info(score, revision, opts)
@@ -927,7 +945,7 @@ module FlatApi
927
945
  # @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
946
  # @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
947
  # @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.
948
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
931
949
  # @return [Array<(ScoreRevision, Fixnum, Hash)>] ScoreRevision data, response status code and response headers
932
950
  def get_score_revision_with_http_info(score, revision, opts = {})
933
951
  if @api_client.config.debugging
@@ -980,9 +998,9 @@ module FlatApi
980
998
  # @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
999
  # @param format The format of the file you will retrieve
982
1000
  # @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
1001
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
985
1002
  # @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;.
1003
+ # @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
986
1004
  # @return [String]
987
1005
  def get_score_revision_data(score, revision, format, opts = {})
988
1006
  data, _status_code, _headers = get_score_revision_data_with_http_info(score, revision, format, opts)
@@ -995,9 +1013,9 @@ module FlatApi
995
1013
  # @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
1014
  # @param format The format of the file you will retrieve
997
1015
  # @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
1016
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1000
1017
  # @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;.
1018
+ # @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
1001
1019
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
1002
1020
  def get_score_revision_data_with_http_info(score, revision, format, opts = {})
1003
1021
  if @api_client.config.debugging
@@ -1025,8 +1043,8 @@ module FlatApi
1025
1043
  # query parameters
1026
1044
  query_params = {}
1027
1045
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1028
- query_params[:'onlyCached'] = opts[:'only_cached'] if !opts[:'only_cached'].nil?
1029
1046
  query_params[:'parts'] = opts[:'parts'] if !opts[:'parts'].nil?
1047
+ query_params[:'onlyCached'] = opts[:'only_cached'] if !opts[:'only_cached'].nil?
1030
1048
 
1031
1049
  # header parameters
1032
1050
  header_params = {}
@@ -1058,7 +1076,7 @@ module FlatApi
1058
1076
  # 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
1077
  # @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
1078
  # @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.
1079
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1062
1080
  # @return [Array<ScoreRevision>]
1063
1081
  def get_score_revisions(score, opts = {})
1064
1082
  data, _status_code, _headers = get_score_revisions_with_http_info(score, opts)
@@ -1069,7 +1087,7 @@ module FlatApi
1069
1087
  # 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
1088
  # @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
1089
  # @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.
1090
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1073
1091
  # @return [Array<(Array<ScoreRevision>, Fixnum, Hash)>] Array<ScoreRevision> data, response status code and response headers
1074
1092
  def get_score_revisions_with_http_info(score, opts = {})
1075
1093
  if @api_client.config.debugging
@@ -1172,7 +1190,7 @@ module FlatApi
1172
1190
  # @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
1191
  # @param track Unique identifier of a score audio track
1174
1192
  # @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.
1193
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1176
1194
  # @return [ScoreTrack]
1177
1195
  def get_score_track(score, track, opts = {})
1178
1196
  data, _status_code, _headers = get_score_track_with_http_info(score, track, opts)
@@ -1184,7 +1202,7 @@ module FlatApi
1184
1202
  # @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
1203
  # @param track Unique identifier of a score audio track
1186
1204
  # @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.
1205
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1188
1206
  # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
1189
1207
  def get_score_track_with_http_info(score, track, opts = {})
1190
1208
  if @api_client.config.debugging
@@ -1232,7 +1250,7 @@ module FlatApi
1232
1250
  end
1233
1251
 
1234
1252
  # List user's scores
1235
- # Get the list of scores owned by the User
1253
+ # Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead.
1236
1254
  # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1237
1255
  # @param [Hash] opts the optional parameters
1238
1256
  # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
@@ -1243,7 +1261,7 @@ module FlatApi
1243
1261
  end
1244
1262
 
1245
1263
  # List user&#39;s scores
1246
- # Get the list of scores owned by the User
1264
+ # Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead.
1247
1265
  # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1248
1266
  # @param [Hash] opts the optional parameters
1249
1267
  # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
@@ -1293,7 +1311,7 @@ module FlatApi
1293
1311
  #
1294
1312
  # @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
1313
  # @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.
1314
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1297
1315
  # @return [Array<ScoreTrack>]
1298
1316
  def list_score_tracks(score, opts = {})
1299
1317
  data, _status_code, _headers = list_score_tracks_with_http_info(score, opts)
@@ -1304,7 +1322,7 @@ module FlatApi
1304
1322
  #
1305
1323
  # @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
1324
  # @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.
1325
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1308
1326
  # @return [Array<(Array<ScoreTrack>, Fixnum, Hash)>] Array<ScoreTrack> data, response status code and response headers
1309
1327
  def list_score_tracks_with_http_info(score, opts = {})
1310
1328
  if @api_client.config.debugging
@@ -1352,7 +1370,7 @@ module FlatApi
1352
1370
  # @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
1371
  # @param comment Unique identifier of a sheet music comment
1354
1372
  # @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.
1373
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1356
1374
  # @return [nil]
1357
1375
  def mark_score_comment_resolved(score, comment, opts = {})
1358
1376
  mark_score_comment_resolved_with_http_info(score, comment, opts)
@@ -1364,7 +1382,7 @@ module FlatApi
1364
1382
  # @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
1383
  # @param comment Unique identifier of a sheet music comment
1366
1384
  # @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.
1385
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1368
1386
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1369
1387
  def mark_score_comment_resolved_with_http_info(score, comment, opts = {})
1370
1388
  if @api_client.config.debugging
@@ -1415,7 +1433,7 @@ module FlatApi
1415
1433
  # @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
1434
  # @param comment Unique identifier of a sheet music comment
1417
1435
  # @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.
1436
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1419
1437
  # @return [nil]
1420
1438
  def mark_score_comment_unresolved(score, comment, opts = {})
1421
1439
  mark_score_comment_unresolved_with_http_info(score, comment, opts)
@@ -1427,7 +1445,7 @@ module FlatApi
1427
1445
  # @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
1446
  # @param comment Unique identifier of a sheet music comment
1429
1447
  # @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.
1448
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1431
1449
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1432
1450
  def mark_score_comment_unresolved_with_http_info(score, comment, opts = {})
1433
1451
  if @api_client.config.debugging
@@ -1478,7 +1496,7 @@ module FlatApi
1478
1496
  # @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
1497
  # @param body
1480
1498
  # @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.
1499
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1482
1500
  # @return [ScoreComment]
1483
1501
  def post_score_comment(score, body, opts = {})
1484
1502
  data, _status_code, _headers = post_score_comment_with_http_info(score, body, opts)
@@ -1490,7 +1508,7 @@ module FlatApi
1490
1508
  # @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
1509
  # @param body
1492
1510
  # @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.
1511
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1494
1512
  # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
1495
1513
  def post_score_comment_with_http_info(score, body, opts = {})
1496
1514
  if @api_client.config.debugging
@@ -1597,13 +1615,67 @@ module FlatApi
1597
1615
  return data, status_code, headers
1598
1616
  end
1599
1617
 
1618
+ # Untrash a score
1619
+ # This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections.
1620
+ # @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;).
1621
+ # @param [Hash] opts the optional parameters
1622
+ # @return [nil]
1623
+ def untrash_score(score, opts = {})
1624
+ untrash_score_with_http_info(score, opts)
1625
+ return nil
1626
+ end
1627
+
1628
+ # Untrash a score
1629
+ # This method will remove the score from the &#x60;trash&#x60; collection and from the deletion queue, and add it back to the original collections.
1630
+ # @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;).
1631
+ # @param [Hash] opts the optional parameters
1632
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1633
+ def untrash_score_with_http_info(score, opts = {})
1634
+ if @api_client.config.debugging
1635
+ @api_client.config.logger.debug "Calling API: ScoreApi.untrash_score ..."
1636
+ end
1637
+ # verify the required parameter 'score' is set
1638
+ if @api_client.config.client_side_validation && score.nil?
1639
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.untrash_score"
1640
+ end
1641
+ # resource path
1642
+ local_var_path = "/scores/{score}/untrash".sub('{' + 'score' + '}', score.to_s)
1643
+
1644
+ # query parameters
1645
+ query_params = {}
1646
+
1647
+ # header parameters
1648
+ header_params = {}
1649
+ # HTTP header 'Accept' (if needed)
1650
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1651
+ # HTTP header 'Content-Type'
1652
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1653
+
1654
+ # form parameters
1655
+ form_params = {}
1656
+
1657
+ # http body (model)
1658
+ post_body = nil
1659
+ auth_names = []
1660
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1661
+ :header_params => header_params,
1662
+ :query_params => query_params,
1663
+ :form_params => form_params,
1664
+ :body => post_body,
1665
+ :auth_names => auth_names)
1666
+ if @api_client.config.debugging
1667
+ @api_client.config.logger.debug "API called: ScoreApi#untrash_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1668
+ end
1669
+ return data, status_code, headers
1670
+ end
1671
+
1600
1672
  # Update an existing comment
1601
1673
  #
1602
1674
  # @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
1675
  # @param comment Unique identifier of a sheet music comment
1604
1676
  # @param body
1605
1677
  # @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.
1678
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1607
1679
  # @return [ScoreComment]
1608
1680
  def update_score_comment(score, comment, body, opts = {})
1609
1681
  data, _status_code, _headers = update_score_comment_with_http_info(score, comment, body, opts)
@@ -1616,7 +1688,7 @@ module FlatApi
1616
1688
  # @param comment Unique identifier of a sheet music comment
1617
1689
  # @param body
1618
1690
  # @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.
1691
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1620
1692
  # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
1621
1693
  def update_score_comment_with_http_info(score, comment, body, opts = {})
1622
1694
  if @api_client.config.debugging