=begin
#Flat API

#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) 

OpenAPI spec version: 2.6.0
Contact: developers@flat.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.0-SNAPSHOT

=end

require "uri"

module FlatApi
  class ScoreApi
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end

    # Add a new collaborator
    # 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. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [ResourceCollaborator]
    def add_score_collaborator(score, body, opts = {})
      data, _status_code, _headers = add_score_collaborator_with_http_info(score, body, opts)
      return data
    end

    # Add a new collaborator
    # 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 &#x60;user&#x60; property. - To invite an external user to the resource, specify its email in the &#x60;userEmail&#x60; property. - To add a Flat group to the resource, specify its unique identifier in the &#x60;group&#x60; property. - To update an existing collaborator, process the same request with different rights. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [Array<(ResourceCollaborator, Fixnum, Hash)>] ResourceCollaborator data, response status code and response headers
    def add_score_collaborator_with_http_info(score, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.add_score_collaborator ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.add_score_collaborator"
      end
      # verify the required parameter 'body' is set
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_collaborator"
      end
      # resource path
      local_var_path = "/scores/{score}/collaborators".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ResourceCollaborator')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#add_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Add a new video or audio track to the score
    # Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [ScoreTrack]
    def add_score_track(score, body, opts = {})
      data, _status_code, _headers = add_score_track_with_http_info(score, body, opts)
      return data
    end

    # Add a new video or audio track to the score
    # Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
    def add_score_track_with_http_info(score, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.add_score_track ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.add_score_track"
      end
      # verify the required parameter 'body' is set
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_track"
      end
      # resource path
      local_var_path = "/scores/{score}/tracks".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreTrack')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#add_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create a new score
    # 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}`. 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [ScoreDetails]
    def create_score(body, opts = {})
      data, _status_code, _headers = create_score_with_http_info(body, opts)
      return data
    end

    # Create a new score
    # 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;. 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
    def create_score_with_http_info(body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.create_score ..."
      end
      # verify the required parameter 'body' is set
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.create_score"
      end
      # resource path
      local_var_path = "/scores"

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreDetails')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#create_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create a new revision
    # Update a score by uploading a new revision for this one. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [ScoreRevision]
    def create_score_revision(score, body, opts = {})
      data, _status_code, _headers = create_score_revision_with_http_info(score, body, opts)
      return data
    end

    # Create a new revision
    # Update a score by uploading a new revision for this one. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [Array<(ScoreRevision, Fixnum, Hash)>] ScoreRevision data, response status code and response headers
    def create_score_revision_with_http_info(score, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.create_score_revision ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.create_score_revision"
      end
      # verify the required parameter 'body' is set
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.create_score_revision"
      end
      # resource path
      local_var_path = "/scores/{score}/revisions".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreRevision')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#create_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete a score
    # 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). 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_score(score, opts = {})
      delete_score_with_http_info(score, opts)
      return nil
    end

    # Delete a score
    # 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). 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def delete_score_with_http_info(score, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.delete_score ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.delete_score"
      end
      # resource path
      local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#delete_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete a comment
    # 
    # @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;). 
    # @param comment Unique identifier of a sheet music comment 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [nil]
    def delete_score_comment(score, comment, opts = {})
      delete_score_comment_with_http_info(score, comment, opts)
      return nil
    end

    # Delete a comment
    # 
    # @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;). 
    # @param comment Unique identifier of a sheet music comment 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def delete_score_comment_with_http_info(score, comment, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.delete_score_comment ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.delete_score_comment"
      end
      # verify the required parameter 'comment' is set
      if @api_client.config.client_side_validation && comment.nil?
        fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.delete_score_comment"
      end
      # resource path
      local_var_path = "/scores/{score}/comments/{comment}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#delete_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Remove an audio or video track linked to the score
    # 
    # @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;). 
    # @param track Unique identifier of a score audio track 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_score_track(score, track, opts = {})
      delete_score_track_with_http_info(score, track, opts)
      return nil
    end

    # Remove an audio or video track linked to the score
    # 
    # @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;). 
    # @param track Unique identifier of a score audio track 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def delete_score_track_with_http_info(score, track, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.delete_score_track ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.delete_score_track"
      end
      # verify the required parameter 'track' is set
      if @api_client.config.client_side_validation && track.nil?
        fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.delete_score_track"
      end
      # resource path
      local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#delete_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Edit a score's metadata
    # 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. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @option opts [ScoreModification] :body 
    # @return [ScoreDetails]
    def edit_score(score, opts = {})
      data, _status_code, _headers = edit_score_with_http_info(score, opts)
      return data
    end

    # Edit a score&#39;s metadata
    # 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. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @option opts [ScoreModification] :body 
    # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
    def edit_score_with_http_info(score, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.edit_score ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.edit_score"
      end
      # resource path
      local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(opts[:'body'])
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreDetails')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#edit_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Fork a score
    # This API call will make a copy of the last revision of the specified score and create a new score. The copy of the score will have a privacy set to `private`.  When using a [Flat for Education](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [ScoreDetails]
    def fork_score(score, body, opts = {})
      data, _status_code, _headers = fork_score_with_http_info(score, body, opts)
      return data
    end

    # Fork a score
    # This API call will make a copy of the last revision of the specified score and create a new score. The copy of the score will have a privacy set to &#x60;private&#x60;.  When using a [Flat for Education](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
    def fork_score_with_http_info(score, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.fork_score ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.fork_score"
      end
      # verify the required parameter 'body' is set
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.fork_score"
      end
      # resource path
      local_var_path = "/scores/{score}/fork".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreDetails')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#fork_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List liked scores
    # 
    # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user. 
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :ids Return only the identifiers of the scores
    # @return [Array<ScoreDetails>]
    def ger_user_likes(user, opts = {})
      data, _status_code, _headers = ger_user_likes_with_http_info(user, opts)
      return data
    end

    # List liked scores
    # 
    # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user. 
    # @param [Hash] opts the optional parameters
    # @option opts [BOOLEAN] :ids Return only the identifiers of the scores
    # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
    def ger_user_likes_with_http_info(user, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.ger_user_likes ..."
      end
      # verify the required parameter 'user' is set
      if @api_client.config.client_side_validation && user.nil?
        fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.ger_user_likes"
      end
      # resource path
      local_var_path = "/users/{user}/likes".sub('{' + 'user' + '}', user.to_s)

      # query parameters
      query_params = {}
      query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<ScoreDetails>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#ger_user_likes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List group's scores
    # Get the list of scores shared with a group. 
    # @param group Unique identifier of a Flat group 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
    # @return [Array<ScoreDetails>]
    def get_group_scores(group, opts = {})
      data, _status_code, _headers = get_group_scores_with_http_info(group, opts)
      return data
    end

    # List group&#39;s scores
    # Get the list of scores shared with a group. 
    # @param group Unique identifier of a Flat group 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
    # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
    def get_group_scores_with_http_info(group, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_group_scores ..."
      end
      # verify the required parameter 'group' is set
      if @api_client.config.client_side_validation && group.nil?
        fail ArgumentError, "Missing the required parameter 'group' when calling ScoreApi.get_group_scores"
      end
      # resource path
      local_var_path = "/groups/{group}/scores".sub('{' + 'group' + '}', group.to_s)

      # query parameters
      query_params = {}
      query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<ScoreDetails>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_group_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get a score's metadata
    # 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. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [ScoreDetails]
    def get_score(score, opts = {})
      data, _status_code, _headers = get_score_with_http_info(score, opts)
      return data
    end

    # Get a score&#39;s metadata
    # 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. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
    def get_score_with_http_info(score, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_score ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score"
      end
      # resource path
      local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreDetails')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get a collaborator
    # Get the information about a collaborator (User or Group). 
    # @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;). 
    # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [ResourceCollaborator]
    def get_score_collaborator(score, collaborator, opts = {})
      data, _status_code, _headers = get_score_collaborator_with_http_info(score, collaborator, opts)
      return data
    end

    # Get a collaborator
    # Get the information about a collaborator (User or Group). 
    # @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;). 
    # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(ResourceCollaborator, Fixnum, Hash)>] ResourceCollaborator data, response status code and response headers
    def get_score_collaborator_with_http_info(score, collaborator, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborator ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_collaborator"
      end
      # verify the required parameter 'collaborator' is set
      if @api_client.config.client_side_validation && collaborator.nil?
        fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.get_score_collaborator"
      end
      # resource path
      local_var_path = "/scores/{score}/collaborators/{collaborator}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'collaborator' + '}', collaborator.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ResourceCollaborator')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List the collaborators
    # 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). 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<ResourceCollaborator>]
    def get_score_collaborators(score, opts = {})
      data, _status_code, _headers = get_score_collaborators_with_http_info(score, opts)
      return data
    end

    # List the collaborators
    # 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). 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(Array<ResourceCollaborator>, Fixnum, Hash)>] Array<ResourceCollaborator> data, response status code and response headers
    def get_score_collaborators_with_http_info(score, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborators ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_collaborators"
      end
      # resource path
      local_var_path = "/scores/{score}/collaborators".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<ResourceCollaborator>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List comments
    # This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @option opts [String] :type Filter the comments by type
    # @option opts [String] :sort Sort
    # @option opts [String] :direction Sort direction
    # @return [Array<ScoreComment>]
    def get_score_comments(score, opts = {})
      data, _status_code, _headers = get_score_comments_with_http_info(score, opts)
      return data
    end

    # List comments
    # This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @option opts [String] :type Filter the comments by type
    # @option opts [String] :sort Sort
    # @option opts [String] :direction Sort direction
    # @return [Array<(Array<ScoreComment>, Fixnum, Hash)>] Array<ScoreComment> data, response status code and response headers
    def get_score_comments_with_http_info(score, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_score_comments ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_comments"
      end
      if @api_client.config.client_side_validation && opts[:'type'] && !['document', 'inline'].include?(opts[:'type'])
        fail ArgumentError, 'invalid value for "type", must be one of document, inline'
      end
      if @api_client.config.client_side_validation && opts[:'sort'] && !['date'].include?(opts[:'sort'])
        fail ArgumentError, 'invalid value for "sort", must be one of date'
      end
      if @api_client.config.client_side_validation && opts[:'direction'] && !['asc', 'desc'].include?(opts[:'direction'])
        fail ArgumentError, 'invalid value for "direction", must be one of asc, desc'
      end
      # resource path
      local_var_path = "/scores/{score}/comments".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
      query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
      query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
      query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<ScoreComment>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_score_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get a score revision
    # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata. 
    # @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;). 
    # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created. 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [ScoreRevision]
    def get_score_revision(score, revision, opts = {})
      data, _status_code, _headers = get_score_revision_with_http_info(score, revision, opts)
      return data
    end

    # Get a score revision
    # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata. 
    # @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;). 
    # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created. 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(ScoreRevision, Fixnum, Hash)>] ScoreRevision data, response status code and response headers
    def get_score_revision_with_http_info(score, revision, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revision ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revision"
      end
      # verify the required parameter 'revision' is set
      if @api_client.config.client_side_validation && revision.nil?
        fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.get_score_revision"
      end
      # resource path
      local_var_path = "/scores/{score}/revisions/{revision}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'revision' + '}', revision.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreRevision')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get a score revision data
    # Retrieve the file corresponding to a score revision (the following formats are available: Flat JSON/Adagio JSON `json`, MusicXML `mxl`/`xml`, MP3 `mp3`, WAV `wav`, MIDI `midi`, or a tumbnail of the first page `thumbnail.png`). 
    # @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;). 
    # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created. 
    # @param format The format of the file you will retrieve
    # @param [Hash] opts the optional parameters
    # @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. 
    # @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;. 
    # @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 
    # @return [String]
    def get_score_revision_data(score, revision, format, opts = {})
      data, _status_code, _headers = get_score_revision_data_with_http_info(score, revision, format, opts)
      return data
    end

    # Get a score revision data
    # Retrieve the file corresponding to a score revision (the following formats are available: Flat JSON/Adagio JSON &#x60;json&#x60;, MusicXML &#x60;mxl&#x60;/&#x60;xml&#x60;, MP3 &#x60;mp3&#x60;, WAV &#x60;wav&#x60;, MIDI &#x60;midi&#x60;, or a tumbnail of the first page &#x60;thumbnail.png&#x60;). 
    # @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;). 
    # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created. 
    # @param format The format of the file you will retrieve
    # @param [Hash] opts the optional parameters
    # @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. 
    # @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;. 
    # @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 
    # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
    def get_score_revision_data_with_http_info(score, revision, format, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revision_data ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revision_data"
      end
      # verify the required parameter 'revision' is set
      if @api_client.config.client_side_validation && revision.nil?
        fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.get_score_revision_data"
      end
      # verify the required parameter 'format' is set
      if @api_client.config.client_side_validation && format.nil?
        fail ArgumentError, "Missing the required parameter 'format' when calling ScoreApi.get_score_revision_data"
      end
      # verify enum value
      if @api_client.config.client_side_validation && !['json', 'mxl', 'xml', 'mp3', 'wav', 'midi', 'thumbnail.png'].include?(format)
        fail ArgumentError, "invalid value for 'format', must be one of json, mxl, xml, mp3, wav, midi, thumbnail.png"
      end
      # resource path
      local_var_path = "/scores/{score}/revisions/{revision}/{format}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'revision' + '}', revision.to_s).sub('{' + 'format' + '}', format.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
      query_params[:'parts'] = opts[:'parts'] if !opts[:'parts'].nil?
      query_params[:'onlyCached'] = opts[:'only_cached'] if !opts[:'only_cached'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'String')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_score_revision_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List the revisions
    # 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. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<ScoreRevision>]
    def get_score_revisions(score, opts = {})
      data, _status_code, _headers = get_score_revisions_with_http_info(score, opts)
      return data
    end

    # List the revisions
    # 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. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(Array<ScoreRevision>, Fixnum, Hash)>] Array<ScoreRevision> data, response status code and response headers
    def get_score_revisions_with_http_info(score, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revisions ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revisions"
      end
      # resource path
      local_var_path = "/scores/{score}/revisions".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<ScoreRevision>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_score_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List submissions related to the score
    # This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @return [Array<AssignmentSubmission>]
    def get_score_submissions(score, opts = {})
      data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
      return data
    end

    # List submissions related to the score
    # This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
    def get_score_submissions_with_http_info(score, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_score_submissions ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_submissions"
      end
      # resource path
      local_var_path = "/scores/{score}/submissions".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<AssignmentSubmission>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Retrieve the details of an audio or video track linked to a score
    # 
    # @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;). 
    # @param track Unique identifier of a score audio track 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [ScoreTrack]
    def get_score_track(score, track, opts = {})
      data, _status_code, _headers = get_score_track_with_http_info(score, track, opts)
      return data
    end

    # Retrieve the details of an audio or video track linked to a score
    # 
    # @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;). 
    # @param track Unique identifier of a score audio track 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
    def get_score_track_with_http_info(score, track, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_score_track ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_track"
      end
      # verify the required parameter 'track' is set
      if @api_client.config.client_side_validation && track.nil?
        fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.get_score_track"
      end
      # resource path
      local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreTrack')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List user's scores
    # 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. 
    # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user. 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
    # @return [Array<ScoreDetails>]
    def get_user_scores(user, opts = {})
      data, _status_code, _headers = get_user_scores_with_http_info(user, opts)
      return data
    end

    # List user&#39;s scores
    # 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. 
    # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user. 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
    # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
    def get_user_scores_with_http_info(user, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.get_user_scores ..."
      end
      # verify the required parameter 'user' is set
      if @api_client.config.client_side_validation && user.nil?
        fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_scores"
      end
      # resource path
      local_var_path = "/users/{user}/scores".sub('{' + 'user' + '}', user.to_s)

      # query parameters
      query_params = {}
      query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<ScoreDetails>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#get_user_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # List the audio or video tracks linked to a score
    # 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<ScoreTrack>]
    def list_score_tracks(score, opts = {})
      data, _status_code, _headers = list_score_tracks_with_http_info(score, opts)
      return data
    end

    # List the audio or video tracks linked to a score
    # 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(Array<ScoreTrack>, Fixnum, Hash)>] Array<ScoreTrack> data, response status code and response headers
    def list_score_tracks_with_http_info(score, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.list_score_tracks ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.list_score_tracks"
      end
      # resource path
      local_var_path = "/scores/{score}/tracks".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<ScoreTrack>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#list_score_tracks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Mark the comment as resolved
    # 
    # @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;). 
    # @param comment Unique identifier of a sheet music comment 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [nil]
    def mark_score_comment_resolved(score, comment, opts = {})
      mark_score_comment_resolved_with_http_info(score, comment, opts)
      return nil
    end

    # Mark the comment as resolved
    # 
    # @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;). 
    # @param comment Unique identifier of a sheet music comment 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def mark_score_comment_resolved_with_http_info(score, comment, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.mark_score_comment_resolved ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.mark_score_comment_resolved"
      end
      # verify the required parameter 'comment' is set
      if @api_client.config.client_side_validation && comment.nil?
        fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_resolved"
      end
      # resource path
      local_var_path = "/scores/{score}/comments/{comment}/resolved".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_resolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Mark the comment as unresolved
    # 
    # @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;). 
    # @param comment Unique identifier of a sheet music comment 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [nil]
    def mark_score_comment_unresolved(score, comment, opts = {})
      mark_score_comment_unresolved_with_http_info(score, comment, opts)
      return nil
    end

    # Mark the comment as unresolved
    # 
    # @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;). 
    # @param comment Unique identifier of a sheet music comment 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def mark_score_comment_unresolved_with_http_info(score, comment, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.mark_score_comment_unresolved ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.mark_score_comment_unresolved"
      end
      # verify the required parameter 'comment' is set
      if @api_client.config.client_side_validation && comment.nil?
        fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_unresolved"
      end
      # resource path
      local_var_path = "/scores/{score}/comments/{comment}/resolved".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_unresolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Post a new comment
    # Post a document or a contextualized comment on a document.  Please note that this method includes an anti-spam system for public scores. We don't guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [ScoreComment]
    def post_score_comment(score, body, opts = {})
      data, _status_code, _headers = post_score_comment_with_http_info(score, body, opts)
      return data
    end

    # Post a new comment
    # Post a document or a contextualized comment on a document.  Please note that this method includes an anti-spam system for public scores. We don&#39;t guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a &#x60;403&#x60; HTTP error and hidden from other users when the &#x60;spam&#x60; property is &#x60;true&#x60;. 
    # @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;). 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
    def post_score_comment_with_http_info(score, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.post_score_comment ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.post_score_comment"
      end
      # verify the required parameter 'body' is set
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.post_score_comment"
      end
      # resource path
      local_var_path = "/scores/{score}/comments".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreComment')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#post_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete a collaborator
    # Remove the specified collaborator from the score 
    # @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;). 
    # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def remove_score_collaborator(score, collaborator, opts = {})
      remove_score_collaborator_with_http_info(score, collaborator, opts)
      return nil
    end

    # Delete a collaborator
    # Remove the specified collaborator from the score 
    # @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;). 
    # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def remove_score_collaborator_with_http_info(score, collaborator, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.remove_score_collaborator ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.remove_score_collaborator"
      end
      # verify the required parameter 'collaborator' is set
      if @api_client.config.client_side_validation && collaborator.nil?
        fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.remove_score_collaborator"
      end
      # resource path
      local_var_path = "/scores/{score}/collaborators/{collaborator}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'collaborator' + '}', collaborator.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#remove_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Untrash a score
    # This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def untrash_score(score, opts = {})
      untrash_score_with_http_info(score, opts)
      return nil
    end

    # Untrash a score
    # 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. 
    # @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;). 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def untrash_score_with_http_info(score, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.untrash_score ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.untrash_score"
      end
      # resource path
      local_var_path = "/scores/{score}/untrash".sub('{' + 'score' + '}', score.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = []
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#untrash_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update an existing comment
    # 
    # @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;). 
    # @param comment Unique identifier of a sheet music comment 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [ScoreComment]
    def update_score_comment(score, comment, body, opts = {})
      data, _status_code, _headers = update_score_comment_with_http_info(score, comment, body, opts)
      return data
    end

    # Update an existing comment
    # 
    # @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;). 
    # @param comment Unique identifier of a sheet music comment 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @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. 
    # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
    def update_score_comment_with_http_info(score, comment, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.update_score_comment ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.update_score_comment"
      end
      # verify the required parameter 'comment' is set
      if @api_client.config.client_side_validation && comment.nil?
        fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.update_score_comment"
      end
      # verify the required parameter 'body' is set
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_comment"
      end
      # resource path
      local_var_path = "/scores/{score}/comments/{comment}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)

      # query parameters
      query_params = {}
      query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreComment')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#update_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update an audio or video track linked to a score
    # 
    # @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;). 
    # @param track Unique identifier of a score audio track 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [ScoreTrack]
    def update_score_track(score, track, body, opts = {})
      data, _status_code, _headers = update_score_track_with_http_info(score, track, body, opts)
      return data
    end

    # Update an audio or video track linked to a score
    # 
    # @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;). 
    # @param track Unique identifier of a score audio track 
    # @param body 
    # @param [Hash] opts the optional parameters
    # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
    def update_score_track_with_http_info(score, track, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: ScoreApi.update_score_track ..."
      end
      # verify the required parameter 'score' is set
      if @api_client.config.client_side_validation && score.nil?
        fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.update_score_track"
      end
      # verify the required parameter 'track' is set
      if @api_client.config.client_side_validation && track.nil?
        fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.update_score_track"
      end
      # verify the required parameter 'body' is set
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_track"
      end
      # resource path
      local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['OAuth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'ScoreTrack')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ScoreApi#update_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
