class FlatApi::ScoreApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/flat_api/api/score_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

add_score_collaborator(score, body, opts = {}) click to toggle source

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. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). @param body @param [Hash] opts the optional parameters @return [ResourceCollaborator]

# File lib/flat_api/api/score_api.rb, line 29
def add_score_collaborator(score, body, opts = {})
  data, _status_code, _headers = add_score_collaborator_with_http_info(score, body, opts)
  return data
end
add_score_collaborator_with_http_info(score, body, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 40
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_score_track(score, body, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 90
def add_score_track(score, body, opts = {})
  data, _status_code, _headers = add_score_track_with_http_info(score, body, opts)
  return data
end
add_score_track_with_http_info(score, body, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 101
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_score(body, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 150
def create_score(body, opts = {})
  data, _status_code, _headers = create_score_with_http_info(body, opts)
  return data
end
create_score_revision(score, body, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 206
def create_score_revision(score, body, opts = {})
  data, _status_code, _headers = create_score_revision_with_http_info(score, body, opts)
  return data
end
create_score_revision_with_http_info(score, body, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 217
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
create_score_with_http_info(body, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 160
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
delete_score(score, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 266
def delete_score(score, opts = {})
  delete_score_with_http_info(score, opts)
  return nil
end
delete_score_comment(score, comment, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 322
def delete_score_comment(score, comment, opts = {})
  delete_score_comment_with_http_info(score, comment, opts)
  return nil
end
delete_score_comment_with_http_info(score, comment, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 334
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
delete_score_track(score, track, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 384
def delete_score_track(score, track, opts = {})
  delete_score_track_with_http_info(score, track, opts)
  return nil
end
delete_score_track_with_http_info(score, track, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 395
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
delete_score_with_http_info(score, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 276
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
edit_score(score, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 444
def edit_score(score, opts = {})
  data, _status_code, _headers = edit_score_with_http_info(score, opts)
  return data
end
edit_score_with_http_info(score, opts = {}) click to toggle source

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 "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

# File lib/flat_api/api/score_api.rb, line 455
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_score(score, body, opts = {}) click to toggle source

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](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]

# File lib/flat_api/api/score_api.rb, line 502
def fork_score(score, body, opts = {})
  data, _status_code, _headers = fork_score_with_http_info(score, body, opts)
  return data
end
fork_score_with_http_info(score, body, opts = {}) click to toggle source

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](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

# File lib/flat_api/api/score_api.rb, line 514
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
ger_user_likes(user, opts = {}) click to toggle source

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>]

# File lib/flat_api/api/score_api.rb, line 565
def ger_user_likes(user, opts = {})
  data, _status_code, _headers = ger_user_likes_with_http_info(user, opts)
  return data
end
ger_user_likes_with_http_info(user, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 576
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
get_group_scores(group, opts = {}) click to toggle source

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>]

# File lib/flat_api/api/score_api.rb, line 623
def get_group_scores(group, opts = {})
  data, _status_code, _headers = get_group_scores_with_http_info(group, opts)
  return data
end
get_group_scores_with_http_info(group, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 634
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_score(score, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 681
def get_score(score, opts = {})
  data, _status_code, _headers = get_score_with_http_info(score, opts)
  return data
end
get_score_collaborator(score, collaborator, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 740
def get_score_collaborator(score, collaborator, opts = {})
  data, _status_code, _headers = get_score_collaborator_with_http_info(score, collaborator, opts)
  return data
end
get_score_collaborator_with_http_info(score, collaborator, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 752
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
get_score_collaborators(score, opts = {}) click to toggle source

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>]

# File lib/flat_api/api/score_api.rb, line 803
def get_score_collaborators(score, opts = {})
  data, _status_code, _headers = get_score_collaborators_with_http_info(score, opts)
  return data
end
get_score_collaborators_with_http_info(score, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 814
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
get_score_comments(score, opts = {}) click to toggle source

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>]

# File lib/flat_api/api/score_api.rb, line 864
def get_score_comments(score, opts = {})
  data, _status_code, _headers = get_score_comments_with_http_info(score, opts)
  return data
end
get_score_comments_with_http_info(score, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 878
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_score_revision(score, revision, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 938
def get_score_revision(score, revision, opts = {})
  data, _status_code, _headers = get_score_revision_with_http_info(score, revision, opts)
  return data
end
get_score_revision_data(score, revision, format, opts = {}) click to toggle source

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 "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]

# File lib/flat_api/api/score_api.rb, line 1005
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_score_revision_data_with_http_info(score, revision, format, opts = {}) click to toggle source

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 "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

# File lib/flat_api/api/score_api.rb, line 1020
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
get_score_revision_with_http_info(score, revision, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 950
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_score_revisions(score, opts = {}) click to toggle source

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>]

# File lib/flat_api/api/score_api.rb, line 1081
def get_score_revisions(score, opts = {})
  data, _status_code, _headers = get_score_revisions_with_http_info(score, opts)
  return data
end
get_score_revisions_with_http_info(score, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1092
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
get_score_submissions(score, opts = {}) click to toggle source

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>]

# File lib/flat_api/api/score_api.rb, line 1138
def get_score_submissions(score, opts = {})
  data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
  return data
end
get_score_submissions_with_http_info(score, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1148
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
get_score_track(score, track, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 1195
def get_score_track(score, track, opts = {})
  data, _status_code, _headers = get_score_track_with_http_info(score, track, opts)
  return data
end
get_score_track_with_http_info(score, track, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1207
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
get_score_with_http_info(score, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 692
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_user_scores(user, opts = {}) click to toggle source

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>]

# File lib/flat_api/api/score_api.rb, line 1258
def get_user_scores(user, opts = {})
  data, _status_code, _headers = get_user_scores_with_http_info(user, opts)
  return data
end
get_user_scores_with_http_info(user, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1269
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_score_tracks(score, opts = {}) click to toggle source

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>]

# File lib/flat_api/api/score_api.rb, line 1316
def list_score_tracks(score, opts = {})
  data, _status_code, _headers = list_score_tracks_with_http_info(score, opts)
  return data
end
list_score_tracks_with_http_info(score, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1327
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_score_comment_resolved(score, comment, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 1375
def mark_score_comment_resolved(score, comment, opts = {})
  mark_score_comment_resolved_with_http_info(score, comment, opts)
  return nil
end
mark_score_comment_resolved_with_http_info(score, comment, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1387
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_score_comment_unresolved(score, comment, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 1438
def mark_score_comment_unresolved(score, comment, opts = {})
  mark_score_comment_unresolved_with_http_info(score, comment, opts)
  return nil
end
mark_score_comment_unresolved_with_http_info(score, comment, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1450
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_score_comment(score, body, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 1501
def post_score_comment(score, body, opts = {})
  data, _status_code, _headers = post_score_comment_with_http_info(score, body, opts)
  return data
end
post_score_comment_with_http_info(score, body, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1513
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
remove_score_collaborator(score, collaborator, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 1564
def remove_score_collaborator(score, collaborator, opts = {})
  remove_score_collaborator_with_http_info(score, collaborator, opts)
  return nil
end
remove_score_collaborator_with_http_info(score, collaborator, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1575
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_score(score, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 1623
def untrash_score(score, opts = {})
  untrash_score_with_http_info(score, opts)
  return nil
end
untrash_score_with_http_info(score, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1633
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_score_comment(score, comment, body, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 1680
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_score_comment_with_http_info(score, comment, body, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1693
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_score_track(score, track, body, opts = {}) click to toggle source

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]

# File lib/flat_api/api/score_api.rb, line 1749
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_score_track_with_http_info(score, track, body, opts = {}) click to toggle source

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

# File lib/flat_api/api/score_api.rb, line 1761
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