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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +34 -12
- data/docs/ClassApi.md +2 -2
- data/docs/Collection.md +18 -0
- data/docs/CollectionApi.md +521 -0
- data/docs/CollectionCapabilities.md +12 -0
- data/docs/CollectionCreation.md +8 -0
- data/docs/CollectionModification.md +8 -0
- data/docs/CollectionPrivacy.md +7 -0
- data/docs/CollectionTitle.md +7 -0
- data/docs/CollectionType.md +7 -0
- data/docs/ResourceCollaborator.md +16 -0
- data/docs/{ScoreCollaboratorCreation.md → ResourceCollaboratorCreation.md} +2 -1
- data/docs/ResourceRights.md +10 -0
- data/docs/ResourceSharingKey.md +7 -0
- data/docs/ScoreApi.md +144 -91
- data/docs/ScoreCreation.md +2 -1
- data/docs/ScoreDetails.md +2 -2
- data/docs/ScoreFork.md +1 -0
- data/docs/ScoreModification.md +2 -1
- data/docs/UserApi.md +1 -1
- data/flat_api.gemspec +1 -1
- data/lib/flat_api.rb +13 -4
- data/lib/flat_api/api/account_api.rb +1 -1
- data/lib/flat_api/api/class_api.rb +1 -1
- data/lib/flat_api/api/collection_api.rb +596 -0
- data/lib/flat_api/api/group_api.rb +1 -1
- data/lib/flat_api/api/organization_api.rb +1 -1
- data/lib/flat_api/api/score_api.rb +125 -53
- data/lib/flat_api/api/user_api.rb +3 -3
- data/lib/flat_api/api_client.rb +1 -1
- data/lib/flat_api/api_error.rb +1 -1
- data/lib/flat_api/configuration.rb +1 -1
- data/lib/flat_api/models/assignment.rb +1 -1
- data/lib/flat_api/models/assignment_copy.rb +1 -1
- data/lib/flat_api/models/assignment_creation.rb +1 -1
- data/lib/flat_api/models/assignment_submission.rb +1 -1
- data/lib/flat_api/models/assignment_submission_update.rb +1 -1
- data/lib/flat_api/models/class_attachment_creation.rb +1 -1
- data/lib/flat_api/models/class_creation.rb +1 -1
- data/lib/flat_api/models/class_details.rb +1 -1
- data/lib/flat_api/models/class_details_canvas.rb +1 -1
- data/lib/flat_api/models/class_details_clever.rb +1 -1
- data/lib/flat_api/models/class_details_google_classroom.rb +1 -1
- data/lib/flat_api/models/class_details_google_drive.rb +1 -1
- data/lib/flat_api/models/class_details_lti.rb +1 -1
- data/lib/flat_api/models/class_roles.rb +1 -1
- data/lib/flat_api/models/class_state.rb +1 -1
- data/lib/flat_api/models/class_update.rb +1 -1
- data/lib/flat_api/models/collection.rb +285 -0
- data/lib/flat_api/models/collection_capabilities.rb +229 -0
- data/lib/flat_api/models/collection_creation.rb +193 -0
- data/lib/flat_api/models/collection_modification.rb +188 -0
- data/lib/flat_api/models/collection_privacy.rb +30 -0
- data/lib/flat_api/models/collection_title.rb +179 -0
- data/lib/flat_api/models/collection_type.rb +34 -0
- data/lib/flat_api/models/flat_error_response.rb +1 -1
- data/lib/flat_api/models/flat_locales.rb +1 -1
- data/lib/flat_api/models/google_classroom_coursework.rb +1 -1
- data/lib/flat_api/models/google_classroom_submission.rb +1 -1
- data/lib/flat_api/models/group.rb +1 -1
- data/lib/flat_api/models/group_details.rb +1 -1
- data/lib/flat_api/models/group_type.rb +1 -1
- data/lib/flat_api/models/license_mode.rb +1 -1
- data/lib/flat_api/models/license_sources.rb +1 -1
- data/lib/flat_api/models/lms_name.rb +1 -1
- data/lib/flat_api/models/lti_credentials.rb +1 -1
- data/lib/flat_api/models/lti_credentials_creation.rb +1 -1
- data/lib/flat_api/models/media_attachment.rb +1 -1
- data/lib/flat_api/models/media_score_sharing_mode.rb +1 -1
- data/lib/flat_api/models/organization_invitation.rb +1 -1
- data/lib/flat_api/models/organization_invitation_creation.rb +1 -1
- data/lib/flat_api/models/organization_roles.rb +1 -1
- data/lib/flat_api/models/{score_collaborator.rb → resource_collaborator.rb} +54 -44
- data/lib/flat_api/models/{score_collaborator_creation.rb → resource_collaborator_creation.rb} +14 -4
- data/lib/flat_api/models/{score_rights.rb → resource_rights.rb} +6 -6
- data/lib/flat_api/models/resource_sharing_key.rb +179 -0
- data/lib/flat_api/models/score_comment.rb +1 -1
- data/lib/flat_api/models/score_comment_context.rb +1 -1
- data/lib/flat_api/models/score_comment_creation.rb +1 -1
- data/lib/flat_api/models/score_comment_update.rb +1 -1
- data/lib/flat_api/models/score_comments_counts.rb +1 -1
- data/lib/flat_api/models/score_creation.rb +13 -3
- data/lib/flat_api/models/score_creation_type.rb +1 -1
- data/lib/flat_api/models/score_data.rb +1 -1
- data/lib/flat_api/models/score_data_encoding.rb +1 -1
- data/lib/flat_api/models/score_details.rb +3 -3
- data/lib/flat_api/models/score_fork.rb +13 -3
- data/lib/flat_api/models/score_license.rb +1 -1
- data/lib/flat_api/models/score_likes_counts.rb +1 -1
- data/lib/flat_api/models/score_modification.rb +13 -20
- data/lib/flat_api/models/score_privacy.rb +1 -1
- data/lib/flat_api/models/score_revision.rb +1 -1
- data/lib/flat_api/models/score_revision_creation.rb +1 -1
- data/lib/flat_api/models/score_revision_statistics.rb +1 -1
- data/lib/flat_api/models/score_source.rb +1 -1
- data/lib/flat_api/models/score_summary.rb +1 -1
- data/lib/flat_api/models/score_track.rb +1 -1
- data/lib/flat_api/models/score_track_creation.rb +1 -1
- data/lib/flat_api/models/score_track_point.rb +1 -1
- data/lib/flat_api/models/score_track_state.rb +1 -1
- data/lib/flat_api/models/score_track_type.rb +1 -1
- data/lib/flat_api/models/score_track_update.rb +1 -1
- data/lib/flat_api/models/score_views_counts.rb +1 -1
- data/lib/flat_api/models/user_admin_update.rb +1 -1
- data/lib/flat_api/models/user_basics.rb +1 -1
- data/lib/flat_api/models/user_creation.rb +1 -1
- data/lib/flat_api/models/user_details.rb +1 -1
- data/lib/flat_api/models/user_details_admin.rb +1 -1
- data/lib/flat_api/models/user_details_admin_license.rb +1 -1
- data/lib/flat_api/models/user_instruments.rb +1 -1
- data/lib/flat_api/models/user_public.rb +1 -1
- data/lib/flat_api/models/user_public_summary.rb +1 -1
- data/lib/flat_api/version.rb +2 -2
- data/spec/api/account_api_spec.rb +2 -2
- data/spec/api/class_api_spec.rb +2 -2
- data/spec/api/collection_api_spec.rb +159 -0
- data/spec/api/group_api_spec.rb +2 -2
- data/spec/api/organization_api_spec.rb +2 -2
- data/spec/api/score_api_spec.rb +41 -26
- data/spec/api/user_api_spec.rb +3 -3
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/assignment_copy_spec.rb +2 -2
- data/spec/models/assignment_creation_spec.rb +2 -2
- data/spec/models/assignment_spec.rb +2 -2
- data/spec/models/assignment_submission_spec.rb +2 -2
- data/spec/models/assignment_submission_update_spec.rb +2 -2
- data/spec/models/class_attachment_creation_spec.rb +2 -2
- data/spec/models/class_creation_spec.rb +2 -2
- data/spec/models/class_details_canvas_spec.rb +2 -2
- data/spec/models/class_details_clever_spec.rb +2 -2
- data/spec/models/class_details_google_classroom_spec.rb +2 -2
- data/spec/models/class_details_google_drive_spec.rb +2 -2
- data/spec/models/class_details_lti_spec.rb +2 -2
- data/spec/models/class_details_spec.rb +2 -2
- data/spec/models/class_roles_spec.rb +2 -2
- data/spec/models/class_state_spec.rb +2 -2
- data/spec/models/class_update_spec.rb +2 -2
- data/spec/models/collection_capabilities_spec.rb +66 -0
- data/spec/models/collection_creation_spec.rb +42 -0
- data/spec/models/collection_modification_spec.rb +42 -0
- data/spec/models/collection_privacy_spec.rb +36 -0
- data/spec/models/collection_spec.rb +102 -0
- data/spec/models/collection_title_spec.rb +36 -0
- data/spec/models/collection_type_spec.rb +36 -0
- data/spec/models/flat_error_response_spec.rb +2 -2
- data/spec/models/flat_locales_spec.rb +2 -2
- data/spec/models/google_classroom_coursework_spec.rb +2 -2
- data/spec/models/google_classroom_submission_spec.rb +2 -2
- data/spec/models/group_details_spec.rb +2 -2
- data/spec/models/group_spec.rb +2 -2
- data/spec/models/group_type_spec.rb +2 -2
- data/spec/models/license_mode_spec.rb +2 -2
- data/spec/models/license_sources_spec.rb +2 -2
- data/spec/models/lms_name_spec.rb +2 -2
- data/spec/models/lti_credentials_creation_spec.rb +2 -2
- data/spec/models/lti_credentials_spec.rb +2 -2
- data/spec/models/media_attachment_spec.rb +2 -2
- data/spec/models/media_score_sharing_mode_spec.rb +2 -2
- data/spec/models/organization_invitation_creation_spec.rb +2 -2
- data/spec/models/organization_invitation_spec.rb +2 -2
- data/spec/models/organization_roles_spec.rb +2 -2
- data/spec/models/{score_collaborator_creation_spec.rb → resource_collaborator_creation_spec.rb} +14 -8
- data/spec/models/{score_collaborator_spec.rb → resource_collaborator_spec.rb} +22 -16
- data/spec/models/{score_rights_spec.rb → resource_rights_spec.rb} +14 -8
- data/spec/models/resource_sharing_key_spec.rb +36 -0
- data/spec/models/score_comment_context_spec.rb +2 -2
- data/spec/models/score_comment_creation_spec.rb +2 -2
- data/spec/models/score_comment_spec.rb +2 -2
- data/spec/models/score_comment_update_spec.rb +2 -2
- data/spec/models/score_comments_counts_spec.rb +2 -2
- data/spec/models/score_creation_spec.rb +8 -2
- data/spec/models/score_creation_type_spec.rb +2 -2
- data/spec/models/score_data_encoding_spec.rb +2 -2
- data/spec/models/score_data_spec.rb +2 -2
- data/spec/models/score_details_spec.rb +2 -2
- data/spec/models/score_fork_spec.rb +8 -2
- data/spec/models/score_license_spec.rb +2 -2
- data/spec/models/score_likes_counts_spec.rb +2 -2
- data/spec/models/score_modification_spec.rb +8 -2
- data/spec/models/score_privacy_spec.rb +2 -2
- data/spec/models/score_revision_creation_spec.rb +2 -2
- data/spec/models/score_revision_spec.rb +2 -2
- data/spec/models/score_revision_statistics_spec.rb +2 -2
- data/spec/models/score_source_spec.rb +2 -2
- data/spec/models/score_summary_spec.rb +2 -2
- data/spec/models/score_track_creation_spec.rb +2 -2
- data/spec/models/score_track_point_spec.rb +2 -2
- data/spec/models/score_track_spec.rb +2 -2
- data/spec/models/score_track_state_spec.rb +2 -2
- data/spec/models/score_track_type_spec.rb +2 -2
- data/spec/models/score_track_update_spec.rb +2 -2
- data/spec/models/score_views_counts_spec.rb +2 -2
- data/spec/models/user_admin_update_spec.rb +2 -2
- data/spec/models/user_basics_spec.rb +2 -2
- data/spec/models/user_creation_spec.rb +2 -2
- data/spec/models/user_details_admin_license_spec.rb +2 -2
- data/spec/models/user_details_admin_spec.rb +2 -2
- data/spec/models/user_details_spec.rb +2 -2
- data/spec/models/user_instruments_spec.rb +2 -2
- data/spec/models/user_public_spec.rb +2 -2
- data/spec/models/user_public_summary_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +50 -15
- data/docs/ScoreCollaborator.md +0 -15
- data/docs/ScoreRights.md +0 -10
- 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.
|
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.
|
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.
|
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
|
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 [
|
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
|
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<(
|
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 => '
|
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 (`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).
|
156
|
+
# 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}`.
|
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
|
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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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
|
272
|
+
# 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).
|
273
273
|
# @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`).
|
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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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's metadata
|
450
|
-
# 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}`).
|
450
|
+
# 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.
|
451
451
|
# @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`).
|
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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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 `score` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
739
|
-
# @return [
|
738
|
+
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
751
|
-
# @return [Array<(
|
750
|
+
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` 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 => '
|
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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
802
|
-
# @return [Array<
|
801
|
+
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` 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 `user` will be populated) or a group (the object `group` will be populated).
|
810
810
|
# @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`).
|
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 `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
813
|
-
# @return [Array<(Array<
|
812
|
+
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` 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<
|
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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
916
934
|
# @param revision Unique identifier of a score revision. You can use `last` 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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
928
946
|
# @param revision Unique identifier of a score revision. You can use `last` 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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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 `last` 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 `privacy` mode set to `privateLink` 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'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 `privacy` mode set to `privateLink` 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 \"1,2,5\".
|
1003
|
+
# @option opts [BOOLEAN] :only_cached Only return files already generated and cached in Flat'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 `last` 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 `privacy` mode set to `privateLink` 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'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 `privacy` mode set to `privateLink` 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 \"1,2,5\".
|
1018
|
+
# @option opts [BOOLEAN] :only_cached Only return files already generated and cached in Flat'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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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
|
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 `me` 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 `parent`
|
@@ -1243,7 +1261,7 @@ module FlatApi
|
|
1243
1261
|
end
|
1244
1262
|
|
1245
1263
|
# List user's scores
|
1246
|
-
# Get the list of scores owned by
|
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 `me` 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 `parent`
|
@@ -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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `trash` 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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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 `privacy` mode set to `privateLink` 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
|