text: /**
   * 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
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   *
   * Swagger Codegen version: 2.4.0-SNAPSHOT
   *
   * Do not edit the class manually.
   *
   */
  
  (function(root, factory) {
    if (typeof define === 'function' && define.amd) {
      // AMD. Register as an anonymous module.
      define(['ApiClient', 'model/AssignmentSubmission', 'model/FlatErrorResponse', 'model/ResourceCollaborator', 'model/ResourceCollaboratorCreation', 'model/ScoreComment', 'model/ScoreCommentCreation', 'model/ScoreCommentUpdate', 'model/ScoreCreation', 'model/ScoreDetails', 'model/ScoreFork', 'model/ScoreModification', 'model/ScoreRevision', 'model/ScoreRevisionCreation', 'model/ScoreTrack', 'model/ScoreTrackCreation', 'model/ScoreTrackUpdate'], factory);
    } else if (typeof module === 'object' && module.exports) {
      // CommonJS-like environments that support module.exports, like Node.
      module.exports = factory(require('../ApiClient'), require('../model/AssignmentSubmission'), require('../model/FlatErrorResponse'), require('../model/ResourceCollaborator'), require('../model/ResourceCollaboratorCreation'), require('../model/ScoreComment'), require('../model/ScoreCommentCreation'), require('../model/ScoreCommentUpdate'), require('../model/ScoreCreation'), require('../model/ScoreDetails'), require('../model/ScoreFork'), require('../model/ScoreModification'), require('../model/ScoreRevision'), require('../model/ScoreRevisionCreation'), require('../model/ScoreTrack'), require('../model/ScoreTrackCreation'), require('../model/ScoreTrackUpdate'));
    } else {
      // Browser globals (root is window)
      if (!root.FlatApi) {
        root.FlatApi = {};
      }
      root.FlatApi.ScoreApi = factory(root.FlatApi.ApiClient, root.FlatApi.AssignmentSubmission, root.FlatApi.FlatErrorResponse, root.FlatApi.ResourceCollaborator, root.FlatApi.ResourceCollaboratorCreation, root.FlatApi.ScoreComment, root.FlatApi.ScoreCommentCreation, root.FlatApi.ScoreCommentUpdate, root.FlatApi.ScoreCreation, root.FlatApi.ScoreDetails, root.FlatApi.ScoreFork, root.FlatApi.ScoreModification, root.FlatApi.ScoreRevision, root.FlatApi.ScoreRevisionCreation, root.FlatApi.ScoreTrack, root.FlatApi.ScoreTrackCreation, root.FlatApi.ScoreTrackUpdate);
    }
  }(this, function(ApiClient, AssignmentSubmission, FlatErrorResponse, ResourceCollaborator, ResourceCollaboratorCreation, ScoreComment, ScoreCommentCreation, ScoreCommentUpdate, ScoreCreation, ScoreDetails, ScoreFork, ScoreModification, ScoreRevision, ScoreRevisionCreation, ScoreTrack, ScoreTrackCreation, ScoreTrackUpdate) {
    'use strict';
  
    /**
     * Score service.
     * @module api/ScoreApi
     * @version 2.6.0
     */
  
    /**
     * Constructs a new ScoreApi. 
     * @alias module:api/ScoreApi
     * @class
     * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
     * default to {@link module:ApiClient#instance} if unspecified.
     */
    var exports = function(apiClient) {
      this.apiClient = apiClient || ApiClient.instance;
  
  
      /**
       * Callback function to receive the result of the addScoreCollaborator operation.
       * @callback module:api/ScoreApi~addScoreCollaboratorCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ResourceCollaborator} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {module:model/ResourceCollaboratorCreation} body 
       * @param {module:api/ScoreApi~addScoreCollaboratorCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ResourceCollaborator}
       */
      this.addScoreCollaborator = function(score, body, callback) {
        var postBody = body;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling addScoreCollaborator");
        }
  
        // verify the required parameter 'body' is set
        if (body === undefined || body === null) {
          throw new Error("Missing the required parameter 'body' when calling addScoreCollaborator");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ResourceCollaborator;
  
        return this.apiClient.callApi(
          '/scores/{score}/collaborators', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the addScoreTrack operation.
       * @callback module:api/ScoreApi~addScoreTrackCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreTrack} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {module:model/ScoreTrackCreation} body 
       * @param {module:api/ScoreApi~addScoreTrackCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreTrack}
       */
      this.addScoreTrack = function(score, body, callback) {
        var postBody = body;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling addScoreTrack");
        }
  
        // verify the required parameter 'body' is set
        if (body === undefined || body === null) {
          throw new Error("Missing the required parameter 'body' when calling addScoreTrack");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreTrack;
  
        return this.apiClient.callApi(
          '/scores/{score}/tracks', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the createScore operation.
       * @callback module:api/ScoreApi~createScoreCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreDetails} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {module:model/ScoreCreation} body 
       * @param {module:api/ScoreApi~createScoreCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreDetails}
       */
      this.createScore = function(body, callback) {
        var postBody = body;
  
        // verify the required parameter 'body' is set
        if (body === undefined || body === null) {
          throw new Error("Missing the required parameter 'body' when calling createScore");
        }
  
  
        var pathParams = {
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreDetails;
  
        return this.apiClient.callApi(
          '/scores', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the createScoreRevision operation.
       * @callback module:api/ScoreApi~createScoreRevisionCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreRevision} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Create a new revision
       * Update a score by uploading a new revision for this one. 
       * @param {String} 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 {module:model/ScoreRevisionCreation} body 
       * @param {module:api/ScoreApi~createScoreRevisionCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreRevision}
       */
      this.createScoreRevision = function(score, body, callback) {
        var postBody = body;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling createScoreRevision");
        }
  
        // verify the required parameter 'body' is set
        if (body === undefined || body === null) {
          throw new Error("Missing the required parameter 'body' when calling createScoreRevision");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreRevision;
  
        return this.apiClient.callApi(
          '/scores/{score}/revisions', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the deleteScore operation.
       * @callback module:api/ScoreApi~deleteScoreCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {module:api/ScoreApi~deleteScoreCallback} callback The callback function, accepting three arguments: error, data, response
       */
      this.deleteScore = function(score, callback) {
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling deleteScore");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = null;
  
        return this.apiClient.callApi(
          '/scores/{score}', 'DELETE',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the deleteScoreComment operation.
       * @callback module:api/ScoreApi~deleteScoreCommentCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Delete a comment
       * @param {String} 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 {String} comment Unique identifier of a sheet music comment 
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~deleteScoreCommentCallback} callback The callback function, accepting three arguments: error, data, response
       */
      this.deleteScoreComment = function(score, comment, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling deleteScoreComment");
        }
  
        // verify the required parameter 'comment' is set
        if (comment === undefined || comment === null) {
          throw new Error("Missing the required parameter 'comment' when calling deleteScoreComment");
        }
  
  
        var pathParams = {
          'score': score,
          'comment': comment
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = null;
  
        return this.apiClient.callApi(
          '/scores/{score}/comments/{comment}', 'DELETE',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the deleteScoreTrack operation.
       * @callback module:api/ScoreApi~deleteScoreTrackCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Remove an audio or video track linked to the score
       * @param {String} 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 {String} track Unique identifier of a score audio track 
       * @param {module:api/ScoreApi~deleteScoreTrackCallback} callback The callback function, accepting three arguments: error, data, response
       */
      this.deleteScoreTrack = function(score, track, callback) {
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling deleteScoreTrack");
        }
  
        // verify the required parameter 'track' is set
        if (track === undefined || track === null) {
          throw new Error("Missing the required parameter 'track' when calling deleteScoreTrack");
        }
  
  
        var pathParams = {
          'score': score,
          'track': track
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = null;
  
        return this.apiClient.callApi(
          '/scores/{score}/tracks/{track}', 'DELETE',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the editScore operation.
       * @callback module:api/ScoreApi~editScoreCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreDetails} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {Object} opts Optional parameters
       * @param {module:model/ScoreModification} opts.body 
       * @param {module:api/ScoreApi~editScoreCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreDetails}
       */
      this.editScore = function(score, opts, callback) {
        opts = opts || {};
        var postBody = opts['body'];
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling editScore");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreDetails;
  
        return this.apiClient.callApi(
          '/scores/{score}', 'PUT',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the forkScore operation.
       * @callback module:api/ScoreApi~forkScoreCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreDetails} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {module:model/ScoreFork} body 
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~forkScoreCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreDetails}
       */
      this.forkScore = function(score, body, opts, callback) {
        opts = opts || {};
        var postBody = body;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling forkScore");
        }
  
        // verify the required parameter 'body' is set
        if (body === undefined || body === null) {
          throw new Error("Missing the required parameter 'body' when calling forkScore");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreDetails;
  
        return this.apiClient.callApi(
          '/scores/{score}/fork', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the gerUserLikes operation.
       * @callback module:api/ScoreApi~gerUserLikesCallback
       * @param {String} error Error message, if any.
       * @param {Array.<module:model/ScoreDetails>} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * List liked scores
       * @param {String} user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user. 
       * @param {Object} opts Optional parameters
       * @param {Boolean} opts.ids Return only the identifiers of the scores
       * @param {module:api/ScoreApi~gerUserLikesCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Array.<module:model/ScoreDetails>}
       */
      this.gerUserLikes = function(user, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'user' is set
        if (user === undefined || user === null) {
          throw new Error("Missing the required parameter 'user' when calling gerUserLikes");
        }
  
  
        var pathParams = {
          'user': user
        };
        var queryParams = {
          'ids': opts['ids'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = [ScoreDetails];
  
        return this.apiClient.callApi(
          '/users/{user}/likes', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getGroupScores operation.
       * @callback module:api/ScoreApi~getGroupScoresCallback
       * @param {String} error Error message, if any.
       * @param {Array.<module:model/ScoreDetails>} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * List group&#39;s scores
       * Get the list of scores shared with a group. 
       * @param {String} group Unique identifier of a Flat group 
       * @param {Object} opts Optional parameters
       * @param {String} opts.parent Filter the score forked from the score id &#x60;parent&#x60;
       * @param {module:api/ScoreApi~getGroupScoresCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Array.<module:model/ScoreDetails>}
       */
      this.getGroupScores = function(group, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'group' is set
        if (group === undefined || group === null) {
          throw new Error("Missing the required parameter 'group' when calling getGroupScores");
        }
  
  
        var pathParams = {
          'group': group
        };
        var queryParams = {
          'parent': opts['parent'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = [ScoreDetails];
  
        return this.apiClient.callApi(
          '/groups/{group}/scores', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getScore operation.
       * @callback module:api/ScoreApi~getScoreCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreDetails} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~getScoreCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreDetails}
       */
      this.getScore = function(score, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling getScore");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreDetails;
  
        return this.apiClient.callApi(
          '/scores/{score}', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getScoreCollaborator operation.
       * @callback module:api/ScoreApi~getScoreCollaboratorCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ResourceCollaborator} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Get a collaborator
       * Get the information about a collaborator (User or Group). 
       * @param {String} 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 {String} collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** 
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~getScoreCollaboratorCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ResourceCollaborator}
       */
      this.getScoreCollaborator = function(score, collaborator, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling getScoreCollaborator");
        }
  
        // verify the required parameter 'collaborator' is set
        if (collaborator === undefined || collaborator === null) {
          throw new Error("Missing the required parameter 'collaborator' when calling getScoreCollaborator");
        }
  
  
        var pathParams = {
          'score': score,
          'collaborator': collaborator
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ResourceCollaborator;
  
        return this.apiClient.callApi(
          '/scores/{score}/collaborators/{collaborator}', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getScoreCollaborators operation.
       * @callback module:api/ScoreApi~getScoreCollaboratorsCallback
       * @param {String} error Error message, if any.
       * @param {Array.<module:model/ResourceCollaborator>} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~getScoreCollaboratorsCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Array.<module:model/ResourceCollaborator>}
       */
      this.getScoreCollaborators = function(score, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling getScoreCollaborators");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = [ResourceCollaborator];
  
        return this.apiClient.callApi(
          '/scores/{score}/collaborators', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getScoreComments operation.
       * @callback module:api/ScoreApi~getScoreCommentsCallback
       * @param {String} error Error message, if any.
       * @param {Array.<module:model/ScoreComment>} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * List comments
       * This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
       * @param {String} 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 {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:model/String} opts.type Filter the comments by type
       * @param {module:model/String} opts.sort Sort
       * @param {module:model/String} opts.direction Sort direction
       * @param {module:api/ScoreApi~getScoreCommentsCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Array.<module:model/ScoreComment>}
       */
      this.getScoreComments = function(score, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling getScoreComments");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
          'type': opts['type'],
          'sort': opts['sort'],
          'direction': opts['direction'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = [ScoreComment];
  
        return this.apiClient.callApi(
          '/scores/{score}/comments', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getScoreRevision operation.
       * @callback module:api/ScoreApi~getScoreRevisionCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreRevision} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {String} revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created. 
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~getScoreRevisionCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreRevision}
       */
      this.getScoreRevision = function(score, revision, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling getScoreRevision");
        }
  
        // verify the required parameter 'revision' is set
        if (revision === undefined || revision === null) {
          throw new Error("Missing the required parameter 'revision' when calling getScoreRevision");
        }
  
  
        var pathParams = {
          'score': score,
          'revision': revision
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreRevision;
  
        return this.apiClient.callApi(
          '/scores/{score}/revisions/{revision}', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getScoreRevisionData operation.
       * @callback module:api/ScoreApi~getScoreRevisionDataCallback
       * @param {String} error Error message, if any.
       * @param {'Blob'} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {String} revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created. 
       * @param {module:model/String} format The format of the file you will retrieve
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {String} opts.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;. 
       * @param {Boolean} opts.onlyCached Only return files already generated and cached in Flat&#39;s production cache. If the file is not availabe, a 404 will be returned 
       * @param {module:api/ScoreApi~getScoreRevisionDataCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link 'Blob'}
       */
      this.getScoreRevisionData = function(score, revision, format, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling getScoreRevisionData");
        }
  
        // verify the required parameter 'revision' is set
        if (revision === undefined || revision === null) {
          throw new Error("Missing the required parameter 'revision' when calling getScoreRevisionData");
        }
  
        // verify the required parameter 'format' is set
        if (format === undefined || format === null) {
          throw new Error("Missing the required parameter 'format' when calling getScoreRevisionData");
        }
  
  
        var pathParams = {
          'score': score,
          'revision': revision,
          'format': format
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
          'parts': opts['parts'],
          'onlyCached': opts['onlyCached'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png'];
        var returnType = 'Blob';
  
        return this.apiClient.callApi(
          '/scores/{score}/revisions/{revision}/{format}', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getScoreRevisions operation.
       * @callback module:api/ScoreApi~getScoreRevisionsCallback
       * @param {String} error Error message, if any.
       * @param {Array.<module:model/ScoreRevision>} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~getScoreRevisionsCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Array.<module:model/ScoreRevision>}
       */
      this.getScoreRevisions = function(score, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling getScoreRevisions");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = [ScoreRevision];
  
        return this.apiClient.callApi(
          '/scores/{score}/revisions', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getScoreSubmissions operation.
       * @callback module:api/ScoreApi~getScoreSubmissionsCallback
       * @param {String} error Error message, if any.
       * @param {Array.<module:model/AssignmentSubmission>} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {module:api/ScoreApi~getScoreSubmissionsCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Array.<module:model/AssignmentSubmission>}
       */
      this.getScoreSubmissions = function(score, callback) {
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling getScoreSubmissions");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = [AssignmentSubmission];
  
        return this.apiClient.callApi(
          '/scores/{score}/submissions', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getScoreTrack operation.
       * @callback module:api/ScoreApi~getScoreTrackCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreTrack} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Retrieve the details of an audio or video track linked to a score
       * @param {String} 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 {String} track Unique identifier of a score audio track 
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~getScoreTrackCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreTrack}
       */
      this.getScoreTrack = function(score, track, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling getScoreTrack");
        }
  
        // verify the required parameter 'track' is set
        if (track === undefined || track === null) {
          throw new Error("Missing the required parameter 'track' when calling getScoreTrack");
        }
  
  
        var pathParams = {
          'score': score,
          'track': track
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreTrack;
  
        return this.apiClient.callApi(
          '/scores/{score}/tracks/{track}', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getUserScores operation.
       * @callback module:api/ScoreApi~getUserScoresCallback
       * @param {String} error Error message, if any.
       * @param {Array.<module:model/ScoreDetails>} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user. 
       * @param {Object} opts Optional parameters
       * @param {String} opts.parent Filter the score forked from the score id &#x60;parent&#x60;
       * @param {module:api/ScoreApi~getUserScoresCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Array.<module:model/ScoreDetails>}
       */
      this.getUserScores = function(user, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'user' is set
        if (user === undefined || user === null) {
          throw new Error("Missing the required parameter 'user' when calling getUserScores");
        }
  
  
        var pathParams = {
          'user': user
        };
        var queryParams = {
          'parent': opts['parent'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = [ScoreDetails];
  
        return this.apiClient.callApi(
          '/users/{user}/scores', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the listScoreTracks operation.
       * @callback module:api/ScoreApi~listScoreTracksCallback
       * @param {String} error Error message, if any.
       * @param {Array.<module:model/ScoreTrack>} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * List the audio or video tracks linked to a score
       * @param {String} 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 {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~listScoreTracksCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Array.<module:model/ScoreTrack>}
       */
      this.listScoreTracks = function(score, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling listScoreTracks");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = [ScoreTrack];
  
        return this.apiClient.callApi(
          '/scores/{score}/tracks', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the markScoreCommentResolved operation.
       * @callback module:api/ScoreApi~markScoreCommentResolvedCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Mark the comment as resolved
       * @param {String} 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 {String} comment Unique identifier of a sheet music comment 
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~markScoreCommentResolvedCallback} callback The callback function, accepting three arguments: error, data, response
       */
      this.markScoreCommentResolved = function(score, comment, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling markScoreCommentResolved");
        }
  
        // verify the required parameter 'comment' is set
        if (comment === undefined || comment === null) {
          throw new Error("Missing the required parameter 'comment' when calling markScoreCommentResolved");
        }
  
  
        var pathParams = {
          'score': score,
          'comment': comment
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = null;
  
        return this.apiClient.callApi(
          '/scores/{score}/comments/{comment}/resolved', 'PUT',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the markScoreCommentUnresolved operation.
       * @callback module:api/ScoreApi~markScoreCommentUnresolvedCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Mark the comment as unresolved
       * @param {String} 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 {String} comment Unique identifier of a sheet music comment 
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~markScoreCommentUnresolvedCallback} callback The callback function, accepting three arguments: error, data, response
       */
      this.markScoreCommentUnresolved = function(score, comment, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling markScoreCommentUnresolved");
        }
  
        // verify the required parameter 'comment' is set
        if (comment === undefined || comment === null) {
          throw new Error("Missing the required parameter 'comment' when calling markScoreCommentUnresolved");
        }
  
  
        var pathParams = {
          'score': score,
          'comment': comment
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = null;
  
        return this.apiClient.callApi(
          '/scores/{score}/comments/{comment}/resolved', 'DELETE',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the postScoreComment operation.
       * @callback module:api/ScoreApi~postScoreCommentCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreComment} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {module:model/ScoreCommentCreation} body 
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~postScoreCommentCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreComment}
       */
      this.postScoreComment = function(score, body, opts, callback) {
        opts = opts || {};
        var postBody = body;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling postScoreComment");
        }
  
        // verify the required parameter 'body' is set
        if (body === undefined || body === null) {
          throw new Error("Missing the required parameter 'body' when calling postScoreComment");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreComment;
  
        return this.apiClient.callApi(
          '/scores/{score}/comments', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the removeScoreCollaborator operation.
       * @callback module:api/ScoreApi~removeScoreCollaboratorCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Delete a collaborator
       * Remove the specified collaborator from the score 
       * @param {String} 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 {String} collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** 
       * @param {module:api/ScoreApi~removeScoreCollaboratorCallback} callback The callback function, accepting three arguments: error, data, response
       */
      this.removeScoreCollaborator = function(score, collaborator, callback) {
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling removeScoreCollaborator");
        }
  
        // verify the required parameter 'collaborator' is set
        if (collaborator === undefined || collaborator === null) {
          throw new Error("Missing the required parameter 'collaborator' when calling removeScoreCollaborator");
        }
  
  
        var pathParams = {
          'score': score,
          'collaborator': collaborator
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = null;
  
        return this.apiClient.callApi(
          '/scores/{score}/collaborators/{collaborator}', 'DELETE',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the untrashScore operation.
       * @callback module:api/ScoreApi~untrashScoreCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * 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 {String} 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 {module:api/ScoreApi~untrashScoreCallback} callback The callback function, accepting three arguments: error, data, response
       */
      this.untrashScore = function(score, callback) {
        var postBody = null;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling untrashScore");
        }
  
  
        var pathParams = {
          'score': score
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = null;
  
        return this.apiClient.callApi(
          '/scores/{score}/untrash', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the updateScoreComment operation.
       * @callback module:api/ScoreApi~updateScoreCommentCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreComment} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Update an existing comment
       * @param {String} 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 {String} comment Unique identifier of a sheet music comment 
       * @param {module:model/ScoreCommentUpdate} body 
       * @param {Object} opts Optional parameters
       * @param {String} opts.sharingKey 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. 
       * @param {module:api/ScoreApi~updateScoreCommentCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreComment}
       */
      this.updateScoreComment = function(score, comment, body, opts, callback) {
        opts = opts || {};
        var postBody = body;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling updateScoreComment");
        }
  
        // verify the required parameter 'comment' is set
        if (comment === undefined || comment === null) {
          throw new Error("Missing the required parameter 'comment' when calling updateScoreComment");
        }
  
        // verify the required parameter 'body' is set
        if (body === undefined || body === null) {
          throw new Error("Missing the required parameter 'body' when calling updateScoreComment");
        }
  
  
        var pathParams = {
          'score': score,
          'comment': comment
        };
        var queryParams = {
          'sharingKey': opts['sharingKey'],
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreComment;
  
        return this.apiClient.callApi(
          '/scores/{score}/comments/{comment}', 'PUT',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the updateScoreTrack operation.
       * @callback module:api/ScoreApi~updateScoreTrackCallback
       * @param {String} error Error message, if any.
       * @param {module:model/ScoreTrack} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Update an audio or video track linked to a score
       * @param {String} 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 {String} track Unique identifier of a score audio track 
       * @param {module:model/ScoreTrackUpdate} body 
       * @param {module:api/ScoreApi~updateScoreTrackCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/ScoreTrack}
       */
      this.updateScoreTrack = function(score, track, body, callback) {
        var postBody = body;
  
        // verify the required parameter 'score' is set
        if (score === undefined || score === null) {
          throw new Error("Missing the required parameter 'score' when calling updateScoreTrack");
        }
  
        // verify the required parameter 'track' is set
        if (track === undefined || track === null) {
          throw new Error("Missing the required parameter 'track' when calling updateScoreTrack");
        }
  
        // verify the required parameter 'body' is set
        if (body === undefined || body === null) {
          throw new Error("Missing the required parameter 'body' when calling updateScoreTrack");
        }
  
  
        var pathParams = {
          'score': score,
          'track': track
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['OAuth2'];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ScoreTrack;
  
        return this.apiClient.callApi(
          '/scores/{score}/tracks/{track}', 'PUT',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
    };
  
    return exports;
  }));
  