Class: FlatApi::ScoreApi
- Inherits:
-
Object
- Object
- FlatApi::ScoreApi
- Defined in:
- lib/flat_api/api/score_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_score_collaborator(score, body, opts = {}) ⇒ ResourceCollaborator
Add a new collaborator Share a score with a single user or a group.
-
#add_score_collaborator_with_http_info(score, body, opts = {}) ⇒ Array<(ResourceCollaborator, Integer, Hash)>
Add a new collaborator Share a score with a single user or a group.
-
#add_score_track(score, body, opts = {}) ⇒ ScoreTrackCreationResponse
Add a new video or audio track to the score Use this method to add new track to the score.
-
#add_score_track_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreTrackCreationResponse, Integer, Hash)>
Add a new video or audio track to the score Use this method to add new track to the score.
-
#create_export_task(score, revision, format, opts = {}) ⇒ Task
Create a new score export task Some of the exports of a score takes are longer to process than a simple API requests.
-
#create_export_task_with_http_info(score, revision, format, opts = {}) ⇒ Array<(Task, Integer, Hash)>
Create a new score export task Some of the exports of a score takes are longer to process than a simple API requests.
-
#create_score(body, opts = {}) ⇒ ScoreDetails
Create a new score Use this API method to create a new music score in the current User account.
-
#create_score_revision(score, body, opts = {}) ⇒ ScoreRevision
Create a new revision Update a score by uploading a new revision for this one.
-
#create_score_revision_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreRevision, Integer, Hash)>
Create a new revision Update a score by uploading a new revision for this one.
-
#create_score_with_http_info(body, opts = {}) ⇒ Array<(ScoreDetails, Integer, Hash)>
Create a new score Use this API method to create a new music score in the current User account.
-
#delete_score(score, opts = {}) ⇒ nil
Delete a score This method can be used by anyone that has at least read access to the document: - When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history.
-
#delete_score_comment(score, comment, opts = {}) ⇒ nil
Delete a comment.
-
#delete_score_comment_with_http_info(score, comment, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a comment.
-
#delete_score_track(score, track, opts = {}) ⇒ nil
Remove an audio or video track linked to the score.
-
#delete_score_track_with_http_info(score, track, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove an audio or video track linked to the score.
-
#delete_score_with_http_info(score, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a score This method can be used by anyone that has at least read access to the document: - When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history.
-
#edit_score(score, body, opts = {}) ⇒ ScoreDetails
Edit a score's metadata This API method allows you to change the metadata of a score document (e.g. its
titleorprivacy), all the properties are optional. -
#edit_score_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreDetails, Integer, Hash)>
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.
-
#fork_score(score, body, opts = {}) ⇒ ScoreDetails
Fork a score This API call will make a copy of the last revision of the specified score and create a new score.
-
#fork_score_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreDetails, Integer, Hash)>
Fork a score This API call will make a copy of the last revision of the specified score and create a new score.
-
#get_group_scores(group, opts = {}) ⇒ Array<ScoreDetails>
List group's scores Get the list of scores shared with a group.
-
#get_group_scores_with_http_info(group, opts = {}) ⇒ Array<(Array<ScoreDetails>, Integer, Hash)>
List group's scores Get the list of scores shared with a group.
-
#get_score(score, opts = {}) ⇒ ScoreDetails
Get a score's metadata Get the details of a score identified by the
scoreparameter in the URL. -
#get_score_collaborator(score, collaborator, opts = {}) ⇒ ResourceCollaborator
Get a collaborator Get the information about a collaborator (User or Group).
-
#get_score_collaborator_with_http_info(score, collaborator, opts = {}) ⇒ Array<(ResourceCollaborator, Integer, Hash)>
Get a collaborator Get the information about a collaborator (User or Group).
-
#get_score_collaborators(score, opts = {}) ⇒ Array<ResourceCollaborator>
List the collaborators This API call will list the different collaborators of a score and their rights on the document.
-
#get_score_collaborators_with_http_info(score, opts = {}) ⇒ Array<(Array<ResourceCollaborator>, Integer, Hash)>
List the collaborators This API call will list the different collaborators of a score and their rights on the document.
-
#get_score_comments(score, opts = {}) ⇒ Array<ScoreComment>
List comments This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
-
#get_score_comments_with_http_info(score, opts = {}) ⇒ Array<(Array<ScoreComment>, Integer, Hash)>
List comments This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
-
#get_score_revision(score, revision, opts = {}) ⇒ ScoreRevision
Get a score revision When creating a score or saving a new version of a score, a revision is created in our storage.
-
#get_score_revision_data(score, revision, format, opts = {}) ⇒ File
Get a score revision data Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON/Adagio JSON
json, MusicXMLmxl/xml, ABC notationabc, MP3mp3, WAVwav, MIDImidi, Flatflat, a tumbnail of the first pagethumbnail.pngor auto sync pointssynchronizationPoints. -
#get_score_revision_data_with_http_info(score, revision, format, opts = {}) ⇒ Array<(File, Integer, Hash)>
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`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`.
-
#get_score_revision_with_http_info(score, revision, opts = {}) ⇒ Array<(ScoreRevision, Integer, Hash)>
Get a score revision When creating a score or saving a new version of a score, a revision is created in our storage.
-
#get_score_revisions(score, opts = {}) ⇒ Array<ScoreRevision>
List the revisions When creating a score or saving a new version of a score, a revision is created in our storage.
-
#get_score_revisions_with_http_info(score, opts = {}) ⇒ Array<(Array<ScoreRevision>, Integer, Hash)>
List the revisions When creating a score or saving a new version of a score, a revision is created in our storage.
-
#get_score_submissions(score, opts = {}) ⇒ Array<AssignmentSubmission>
List submissions related to the score This API call will list the different assignments submissions where the score is attached.
-
#get_score_submissions_with_http_info(score, opts = {}) ⇒ Array<(Array<AssignmentSubmission>, Integer, Hash)>
List submissions related to the score This API call will list the different assignments submissions where the score is attached.
-
#get_score_track(score, track, opts = {}) ⇒ ScoreTrack
Retrieve the details of an audio or video track linked to a score.
-
#get_score_track_with_http_info(score, track, opts = {}) ⇒ Array<(ScoreTrack, Integer, Hash)>
Retrieve the details of an audio or video track linked to a score.
-
#get_score_with_http_info(score, opts = {}) ⇒ Array<(ScoreDetails, Integer, Hash)>
Get a score's metadata Get the details of a score identified by the `score` parameter in the URL.
-
#get_user_likes(user, opts = {}) ⇒ Array<ScoreDetails>
List liked scores.
-
#get_user_likes_with_http_info(user, opts = {}) ⇒ Array<(Array<ScoreDetails>, Integer, Hash)>
List liked scores.
-
#get_user_scores(user, opts = {}) ⇒ Array<ScoreDetails>
List user's scores Get the list of public scores owned by a User.
-
#get_user_scores_with_http_info(user, opts = {}) ⇒ Array<(Array<ScoreDetails>, Integer, Hash)>
List user's scores Get the list of public scores owned by a User.
-
#initialize(api_client = ApiClient.default) ⇒ ScoreApi
constructor
A new instance of ScoreApi.
-
#list_score_tracks(score, opts = {}) ⇒ Array<ScoreTrack>
List the audio or video tracks linked to a score List all audio or video tracks linked to a score.
-
#list_score_tracks_with_http_info(score, opts = {}) ⇒ Array<(Array<ScoreTrack>, Integer, Hash)>
List the audio or video tracks linked to a score List all audio or video tracks linked to a score.
-
#mark_score_comment_resolved(score, comment, opts = {}) ⇒ nil
Mark the comment as resolved.
-
#mark_score_comment_resolved_with_http_info(score, comment, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Mark the comment as resolved.
-
#mark_score_comment_unresolved(score, comment, opts = {}) ⇒ nil
Mark the comment as unresolved.
-
#mark_score_comment_unresolved_with_http_info(score, comment, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Mark the comment as unresolved.
-
#post_score_comment(score, body, opts = {}) ⇒ ScoreComment
Post a new comment Post a document or a contextualized comment on a document.
-
#post_score_comment_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreComment, Integer, Hash)>
Post a new comment Post a document or a contextualized comment on a document.
-
#remove_score_collaborator(score, collaborator, opts = {}) ⇒ nil
Delete a collaborator Remove the specified collaborator from the score.
-
#remove_score_collaborator_with_http_info(score, collaborator, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a collaborator Remove the specified collaborator from the score.
-
#untrash_score(score, opts = {}) ⇒ nil
Untrash a score This method will remove the score from the
trashcollection and from the deletion queue, and add it back to the original collections. -
#untrash_score_with_http_info(score, opts = {}) ⇒ Array<(nil, Integer, Hash)>
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.
-
#update_score_comment(score, comment, body, opts = {}) ⇒ ScoreComment
Update an existing comment.
-
#update_score_comment_with_http_info(score, comment, body, opts = {}) ⇒ Array<(ScoreComment, Integer, Hash)>
Update an existing comment.
-
#update_score_track(score, track, body, opts = {}) ⇒ ScoreTrack
Update an audio or video track linked to a score.
-
#update_score_track_with_http_info(score, track, body, opts = {}) ⇒ Array<(ScoreTrack, Integer, Hash)>
Update an audio or video track linked to a score.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ScoreApi
Returns a new instance of ScoreApi.
19 20 21 |
# File 'lib/flat_api/api/score_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/flat_api/api/score_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_score_collaborator(score, body, opts = {}) ⇒ ResourceCollaborator
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.
28 29 30 31 |
# File 'lib/flat_api/api/score_api.rb', line 28 def add_score_collaborator(score, body, opts = {}) data, _status_code, _headers = add_score_collaborator_with_http_info(score, body, opts) data end |
#add_score_collaborator_with_http_info(score, body, opts = {}) ⇒ Array<(ResourceCollaborator, Integer, Hash)>
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.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/flat_api/api/score_api.rb', line 39 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ResourceCollaborator' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.add_score_collaborator", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) 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 = {}) ⇒ ScoreTrackCreationResponse
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.
102 103 104 105 |
# File 'lib/flat_api/api/score_api.rb', line 102 def add_score_track(score, body, opts = {}) data, _status_code, _headers = add_score_track_with_http_info(score, body, opts) data end |
#add_score_track_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreTrackCreationResponse, Integer, Hash)>
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.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/flat_api/api/score_api.rb', line 113 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ScoreTrackCreationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.add_score_track", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) 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_export_task(score, revision, format, opts = {}) ⇒ Task
Create a new score export task Some of the exports of a score takes are longer to process than a simple API requests. Use this endpoint to launch a new export of one score hosted on Flat.
179 180 181 182 |
# File 'lib/flat_api/api/score_api.rb', line 179 def create_export_task(score, revision, format, opts = {}) data, _status_code, _headers = create_export_task_with_http_info(score, revision, format, opts) data end |
#create_export_task_with_http_info(score, revision, format, opts = {}) ⇒ Array<(Task, Integer, Hash)>
Create a new score export task Some of the exports of a score takes are longer to process than a simple API requests. Use this endpoint to launch a new export of one score hosted on Flat.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/flat_api/api/score_api.rb', line 193 def create_export_task_with_http_info(score, revision, format, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScoreApi.create_export_task ...' 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_export_task" 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.create_export_task" 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.create_export_task" end # verify enum value allowable_values = ["mp3", "wav", "practicefirst"] if @api_client.config.client_side_validation && !allowable_values.include?(format) fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}" end # resource path local_var_path = '/scores/{score}/revisions/{revision}/{format}/task'.sub('{score}', CGI.escape(score.to_s)).sub('{revision}', CGI.escape(revision.to_s)).sub('{format}', CGI.escape(format.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'Task' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.create_export_task", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScoreApi#create_export_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_score(body, opts = {}) ⇒ ScoreDetails
Create a new score
Use this API method to create a new music score in the current User account. This API endpoints provides 3 ways to create scores: * ScoreCreationBuilderData : Create a blank score by providing the list of instruments to use. You can optionally customize the initial key signature, time signature, enable TABs, Chord grids, as well as the page layout. * ScoreCreationFileImport: Import a file to create the new Flat document. Preferred formats: * MusicXML: .xml, .musicxml, .mxl (compressed) — MIME: vnd.recordare.musicxml+xml, vnd.recordare.musicxml. This is the only format that preserves all notation data (articulations, dynamics, layout, etc.) with full round-trip support. * MIDI: .mid, .midi — MIME: audio/midi. Only preserves pitch, timing, and instrument data; notation details are lost. Also supported (converted to MusicXML on import, some notation details may be lost): * Guitar Pro: .gp, .gp3, .gp4, .gp5, .gpx, .gtp * MuseScore: .mscz, .mscx * Finale: .musx * ABC notation: .abc — MIME: text/vnd.abc * PowerTab: .ptb * Capella: .cap, .capx * MEI: .mei * Overture: .ove * TablEdit: .tef * Band-in-a-Box: .mgu, .sgu * Karaoke MIDI: .kar * MuseData: .md * Score Writer: .scw * Bagpipe Music Writer: .bmw, .bww * Encore: .enc Scanned music (requires supportsTasks, runs our music recognition and spends credits): * PDF: .pdf * Images: .jpg, .png, .webp, .tiff, .gif, .avif, .heic, .heif The file is identified by its own content, so its extension and any declared type do not have to match. One file per request: a multi-page PDF or a multi-frame TIFF is fine, but several separate images of the same score (a page photographed at a time) need createOmrJob, which takes many inputs in one job and bills them as a single document. Its live limits are served by getOmrCapabilities. * ScoreCreationGoogleDriveImport: Import an existing Google Drive file from the connected Google Drive account. 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. When using an OAuth2 access token or a personal token, the score will be automatically added to your dedicated app collection in the account (/v2/collections/app). 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}.
265 266 267 268 |
# File 'lib/flat_api/api/score_api.rb', line 265 def create_score(body, opts = {}) data, _status_code, _headers = create_score_with_http_info(body, opts) data end |
#create_score_revision(score, body, opts = {}) ⇒ ScoreRevision
Create a new revision Update a score by uploading a new revision for this one.
334 335 336 337 |
# File 'lib/flat_api/api/score_api.rb', line 334 def create_score_revision(score, body, opts = {}) data, _status_code, _headers = create_score_revision_with_http_info(score, body, opts) data end |
#create_score_revision_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreRevision, Integer, Hash)>
Create a new revision Update a score by uploading a new revision for this one.
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/flat_api/api/score_api.rb', line 345 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ScoreRevision' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.create_score_revision", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) 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 = {}) ⇒ Array<(ScoreDetails, Integer, Hash)>
Create a new score Use this API method to create a new music score in the current User account. This API endpoints provides 3 ways to create scores: * `ScoreCreationBuilderData` : Create a blank score by providing the list of instruments to use. You can optionally customize the initial key signature, time signature, enable TABs, Chord grids, as well as the page layout. * `ScoreCreationFileImport`: Import a file to create the new Flat document. Preferred formats: * MusicXML: `.xml`, `.musicxml`, `.mxl` (compressed) — MIME: `vnd.recordare.musicxml+xml`, `vnd.recordare.musicxml`. This is the only format that preserves all notation data (articulations, dynamics, layout, etc.) with full round-trip support. * MIDI: `.mid`, `.midi` — MIME: `audio/midi`. Only preserves pitch, timing, and instrument data; notation details are lost. Also supported (converted to MusicXML on import, some notation details may be lost): * Guitar Pro: `.gp`, `.gp3`, `.gp4`, `.gp5`, `.gpx`, `.gtp` * MuseScore: `.mscz`, `.mscx` * Finale: `.musx` * ABC notation: `.abc` — MIME: `text/vnd.abc` * PowerTab: `.ptb` * Capella: `.cap`, `.capx` * MEI: `.mei` * Overture: `.ove` * TablEdit: `.tef` * Band-in-a-Box: `.mgu`, `.sgu` * Karaoke MIDI: `.kar` * MuseData: `.md` * Score Writer: `.scw` * Bagpipe Music Writer: `.bmw`, `.bww` * Encore: `.enc` Scanned music (requires `supportsTasks`, runs our music recognition and spends credits): * PDF: `.pdf` * Images: `.jpg`, `.png`, `.webp`, `.tiff`, `.gif`, `.avif`, `.heic`, `.heif` The file is identified by its own content, so its extension and any declared type do not have to match. One file per request: a multi-page PDF or a multi-frame TIFF is fine, but several separate images of the same score (a page photographed at a time) need `createOmrJob`, which takes many inputs in one job and bills them as a single document. Its live limits are served by `getOmrCapabilities`. * `ScoreCreationGoogleDriveImport`: Import an existing Google Drive file from the connected Google Drive account. 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. When using an OAuth2 access token or a personal token, the score will be automatically added to your dedicated app collection in the account (`/v2/collections/app`). 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`.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/flat_api/api/score_api.rb', line 275 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 = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ScoreDetails' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.create_score", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) 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 = {}) ⇒ nil
Delete a score This method can be used by anyone that has at least read access to the document: - 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 collaborator, the score will be unshared (i.e. removed from the account & own collections). - When called by another user that has the score in its collections, the score will be removed from all the user collections.
408 409 410 411 |
# File 'lib/flat_api/api/score_api.rb', line 408 def delete_score(score, opts = {}) delete_score_with_http_info(score, opts) nil end |
#delete_score_comment(score, comment, opts = {}) ⇒ nil
Delete a comment
475 476 477 478 |
# File 'lib/flat_api/api/score_api.rb', line 475 def delete_score_comment(score, comment, opts = {}) delete_score_comment_with_http_info(score, comment, opts) nil end |
#delete_score_comment_with_http_info(score, comment, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a comment
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/flat_api/api/score_api.rb', line 487 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}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'eventProperties'] = opts[:'event_properties'] if !opts[:'event_properties'].nil? query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.delete_score_comment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) 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 = {}) ⇒ nil
Remove an audio or video track linked to the score
551 552 553 554 |
# File 'lib/flat_api/api/score_api.rb', line 551 def delete_score_track(score, track, opts = {}) delete_score_track_with_http_info(score, track, opts) nil end |
#delete_score_track_with_http_info(score, track, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove an audio or video track linked to the score
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/flat_api/api/score_api.rb', line 561 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}', CGI.escape(score.to_s)).sub('{track}', CGI.escape(track.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.delete_score_track", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) 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 = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a score This method can be used by anyone that has at least read access to the document: - 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 collaborator, the score will be unshared (i.e. removed from the account & own collections). - When called by another user that has the score in its collections, the score will be removed from all the user collections.
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/flat_api/api/score_api.rb', line 419 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'now'] = opts[:'now'] if !opts[:'now'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.delete_score", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) 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, body, opts = {}) ⇒ ScoreDetails
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, subtitle, composer, lyricist, arranger or licenseText, the metadatas will be instantly be updated, and a real-time action will be pushed to update the document lazily. This pending document modification will be automatically be saved as a new version by either a connected client or our internal versioning service.
619 620 621 622 |
# File 'lib/flat_api/api/score_api.rb', line 619 def edit_score(score, body, opts = {}) data, _status_code, _headers = edit_score_with_http_info(score, body, opts) data end |
#edit_score_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreDetails, Integer, Hash)>
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`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadatas will be instantly be updated, and a real-time action will be pushed to update the document lazily. This pending document modification will be automatically be saved as a new version by either a connected client or our internal versioning service.
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 |
# File 'lib/flat_api/api/score_api.rb', line 630 def edit_score_with_http_info(score, body, 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 # 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.edit_score" end # resource path local_var_path = '/scores/{score}'.sub('{score}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ScoreDetails' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.edit_score", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) 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 = {}) ⇒ ScoreDetails
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 account, the inline and contextualized comments will be accessible in the child document.
694 695 696 697 |
# File 'lib/flat_api/api/score_api.rb', line 694 def fork_score(score, body, opts = {}) data, _status_code, _headers = fork_score_with_http_info(score, body, opts) data end |
#fork_score_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreDetails, Integer, Hash)>
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 account, the inline and contextualized comments will be accessible in the child document.
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 |
# File 'lib/flat_api/api/score_api.rb', line 706 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ScoreDetails' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.fork_score", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) 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 |
#get_group_scores(group, opts = {}) ⇒ Array<ScoreDetails>
List group's scores Get the list of scores shared with a group.
770 771 772 773 |
# File 'lib/flat_api/api/score_api.rb', line 770 def get_group_scores(group, opts = {}) data, _status_code, _headers = get_group_scores_with_http_info(group, opts) data end |
#get_group_scores_with_http_info(group, opts = {}) ⇒ Array<(Array<ScoreDetails>, Integer, Hash)>
List group's scores Get the list of scores shared with a group.
781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 |
# File 'lib/flat_api/api/score_api.rb', line 781 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}', CGI.escape(group.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ScoreDetails>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_group_scores", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ ScoreDetails
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.
836 837 838 839 |
# File 'lib/flat_api/api/score_api.rb', line 836 def get_score(score, opts = {}) data, _status_code, _headers = get_score_with_http_info(score, opts) data end |
#get_score_collaborator(score, collaborator, opts = {}) ⇒ ResourceCollaborator
Get a collaborator Get the information about a collaborator (User or Group).
903 904 905 906 |
# File 'lib/flat_api/api/score_api.rb', line 903 def get_score_collaborator(score, collaborator, opts = {}) data, _status_code, _headers = get_score_collaborator_with_http_info(score, collaborator, opts) data end |
#get_score_collaborator_with_http_info(score, collaborator, opts = {}) ⇒ Array<(ResourceCollaborator, Integer, Hash)>
Get a collaborator Get the information about a collaborator (User or Group).
915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 |
# File 'lib/flat_api/api/score_api.rb', line 915 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}', CGI.escape(score.to_s)).sub('{collaborator}', CGI.escape(collaborator.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ResourceCollaborator' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_score_collaborator", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ Array<ResourceCollaborator>
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).
974 975 976 977 |
# File 'lib/flat_api/api/score_api.rb', line 974 def get_score_collaborators(score, opts = {}) data, _status_code, _headers = get_score_collaborators_with_http_info(score, opts) data end |
#get_score_collaborators_with_http_info(score, opts = {}) ⇒ Array<(Array<ResourceCollaborator>, Integer, Hash)>
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).
985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 |
# File 'lib/flat_api/api/score_api.rb', line 985 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ResourceCollaborator>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_score_collaborators", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ Array<ScoreComment>
List comments This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
1043 1044 1045 1046 |
# File 'lib/flat_api/api/score_api.rb', line 1043 def get_score_comments(score, opts = {}) data, _status_code, _headers = get_score_comments_with_http_info(score, opts) data end |
#get_score_comments_with_http_info(score, opts = {}) ⇒ Array<(Array<ScoreComment>, Integer, Hash)>
List comments This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 |
# File 'lib/flat_api/api/score_api.rb', line 1057 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 allowable_values = ["document", "inline"] if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type']) fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end allowable_values = ["date"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end allowable_values = ["asc", "desc"] if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction']) fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}" end # resource path local_var_path = '/scores/{score}/comments'.sub('{score}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} 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? query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ScoreComment>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_score_comments", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ ScoreRevision
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.
1128 1129 1130 1131 |
# File 'lib/flat_api/api/score_api.rb', line 1128 def get_score_revision(score, revision, opts = {}) data, _status_code, _headers = get_score_revision_with_http_info(score, revision, opts) data end |
#get_score_revision_data(score, revision, format, opts = {}) ⇒ File
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, ABC notation abc, MP3 mp3, WAV wav, MIDI midi, Flat flat, a tumbnail of the first page thumbnail.png or auto sync points synchronizationPoints. ABC notation is a text format that cannot express everything a score contains. Like MIDI, the export is lossy: notation ABC has no equivalent for is approximated or dropped rather than failing the request.
1204 1205 1206 1207 |
# File 'lib/flat_api/api/score_api.rb', line 1204 def get_score_revision_data(score, revision, format, opts = {}) data, _status_code, _headers = get_score_revision_data_with_http_info(score, revision, format, opts) data end |
#get_score_revision_data_with_http_info(score, revision, format, opts = {}) ⇒ Array<(File, Integer, Hash)>
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`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. ABC notation is a text format that cannot express everything a score contains. Like MIDI, the export is lossy: notation ABC has no equivalent for is approximated or dropped rather than failing the request.
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 |
# File 'lib/flat_api/api/score_api.rb', line 1220 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 allowable_values = ["json", "mxl", "xml", "abc", "mp3", "wav", "midi", "flat", "thumbnail.png", "synchronizationPoints"] if @api_client.config.client_side_validation && !allowable_values.include?(format) fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}" end # resource path local_var_path = '/scores/{score}/revisions/{revision}/{format}'.sub('{score}', CGI.escape(score.to_s)).sub('{revision}', CGI.escape(revision.to_s)).sub('{format}', CGI.escape(format.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? query_params[:'parts'] = opts[:'parts'] if !opts[:'parts'].nil? query_params[:'defaultTrack'] = opts[:'default_track'] if !opts[:'default_track'].nil? query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil? # header parameters header_params = opts[: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', 'application/octet-stream']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_score_revision_data", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ Array<(ScoreRevision, Integer, Hash)>
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.
1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 |
# File 'lib/flat_api/api/score_api.rb', line 1140 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}', CGI.escape(score.to_s)).sub('{revision}', CGI.escape(revision.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ScoreRevision' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_score_revision", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ Array<ScoreRevision>
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.
1291 1292 1293 1294 |
# File 'lib/flat_api/api/score_api.rb', line 1291 def get_score_revisions(score, opts = {}) data, _status_code, _headers = get_score_revisions_with_http_info(score, opts) data end |
#get_score_revisions_with_http_info(score, opts = {}) ⇒ Array<(Array<ScoreRevision>, Integer, Hash)>
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.
1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 |
# File 'lib/flat_api/api/score_api.rb', line 1302 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ScoreRevision>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_score_revisions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ Array<AssignmentSubmission>
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.
1356 1357 1358 1359 |
# File 'lib/flat_api/api/score_api.rb', line 1356 def get_score_submissions(score, opts = {}) data, _status_code, _headers = get_score_submissions_with_http_info(score, opts) data end |
#get_score_submissions_with_http_info(score, opts = {}) ⇒ Array<(Array<AssignmentSubmission>, Integer, Hash)>
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.
1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 |
# File 'lib/flat_api/api/score_api.rb', line 1366 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_score_submissions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ ScoreTrack
Retrieve the details of an audio or video track linked to a score
1420 1421 1422 1423 |
# File 'lib/flat_api/api/score_api.rb', line 1420 def get_score_track(score, track, opts = {}) data, _status_code, _headers = get_score_track_with_http_info(score, track, opts) data end |
#get_score_track_with_http_info(score, track, opts = {}) ⇒ Array<(ScoreTrack, Integer, Hash)>
Retrieve the details of an audio or video track linked to a score
1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 |
# File 'lib/flat_api/api/score_api.rb', line 1431 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}', CGI.escape(score.to_s)).sub('{track}', CGI.escape(track.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ScoreTrack' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_score_track", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ Array<(ScoreDetails, Integer, Hash)>
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.
847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 |
# File 'lib/flat_api/api/score_api.rb', line 847 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ScoreDetails' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_score", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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_likes(user, opts = {}) ⇒ Array<ScoreDetails>
List liked scores
1492 1493 1494 1495 |
# File 'lib/flat_api/api/score_api.rb', line 1492 def get_user_likes(user, opts = {}) data, _status_code, _headers = get_user_likes_with_http_info(user, opts) data end |
#get_user_likes_with_http_info(user, opts = {}) ⇒ Array<(Array<ScoreDetails>, Integer, Hash)>
List liked scores
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 |
# File 'lib/flat_api/api/score_api.rb', line 1505 def get_user_likes_with_http_info(user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScoreApi.get_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.get_user_likes" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_likes, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_likes, must be greater than or equal to 1.' end # resource path local_var_path = '/users/{user}/likes'.sub('{user}', CGI.escape(user.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil? query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ScoreDetails>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_user_likes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScoreApi#get_user_likes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_scores(user, opts = {}) ⇒ Array<ScoreDetails>
List user's scores
Get the list of public scores owned by a User. If you want to access to private scores, please use the Collections API. For example GET /v2/collections/allScores/scores to list all recently updated scores.
1576 1577 1578 1579 |
# File 'lib/flat_api/api/score_api.rb', line 1576 def get_user_scores(user, opts = {}) data, _status_code, _headers = get_user_scores_with_http_info(user, opts) data end |
#get_user_scores_with_http_info(user, opts = {}) ⇒ Array<(Array<ScoreDetails>, Integer, Hash)>
List user's scores Get the list of public scores owned by a User. If you want to access to private scores, please use the Collections API. For example `GET /v2/collections/allScores/scores` to list all recently updated scores.
1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 |
# File 'lib/flat_api/api/score_api.rb', line 1592 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 allowable_values = ["creationDate", "modificationDate", "title"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end allowable_values = ["asc", "desc"] if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction']) fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_scores, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_scores, must be greater than or equal to 1.' end # resource path local_var_path = '/users/{user}/scores'.sub('{user}', CGI.escape(user.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'paginate'] = opts[:'paginate'] if !opts[:'paginate'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil? query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ScoreDetails>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.get_user_scores", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ Array<ScoreTrack>
List the audio or video tracks linked to a score
List all audio or video tracks linked to a score. Access Control for Performance Submission Tracks: Tracks with purpose: 'performanceSubmission' are filtered based on user role: * Students: Can only see their own performance submission tracks, plus all non-performance tracks * Teachers and score admins: Can see all tracks from all students The assignment query parameter can be used to filter tracks for a specific assignment, but the access control rules above still apply.
1670 1671 1672 1673 |
# File 'lib/flat_api/api/score_api.rb', line 1670 def list_score_tracks(score, opts = {}) data, _status_code, _headers = list_score_tracks_with_http_info(score, opts) data end |
#list_score_tracks_with_http_info(score, opts = {}) ⇒ Array<(Array<ScoreTrack>, Integer, Hash)>
List the audio or video tracks linked to a score List all audio or video tracks linked to a score. Access Control for Performance Submission Tracks: Tracks with `purpose: 'performanceSubmission'` are filtered based on user role: * Students: Can only see their own performance submission tracks, plus all non-performance tracks * Teachers and score admins: Can see all tracks from all students The `assignment` query parameter can be used to filter tracks for a specific assignment, but the access control rules above still apply.
1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 |
# File 'lib/flat_api/api/score_api.rb', line 1683 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? query_params[:'assignment'] = opts[:'assignment'] if !opts[:'assignment'].nil? query_params[:'listAutoTrack'] = opts[:'list_auto_track'] if !opts[:'list_auto_track'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ScoreTrack>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.list_score_tracks", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 = {}) ⇒ nil
Mark the comment as resolved
1740 1741 1742 1743 |
# File 'lib/flat_api/api/score_api.rb', line 1740 def mark_score_comment_resolved(score, comment, opts = {}) mark_score_comment_resolved_with_http_info(score, comment, opts) nil end |
#mark_score_comment_resolved_with_http_info(score, comment, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Mark the comment as resolved
1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 |
# File 'lib/flat_api/api/score_api.rb', line 1751 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}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.mark_score_comment_resolved", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) 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 = {}) ⇒ nil
Mark the comment as unresolved
1810 1811 1812 1813 |
# File 'lib/flat_api/api/score_api.rb', line 1810 def mark_score_comment_unresolved(score, comment, opts = {}) mark_score_comment_unresolved_with_http_info(score, comment, opts) nil end |
#mark_score_comment_unresolved_with_http_info(score, comment, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Mark the comment as unresolved
1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 |
# File 'lib/flat_api/api/score_api.rb', line 1821 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}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.mark_score_comment_unresolved", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) 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 = {}) ⇒ ScoreComment
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.
1881 1882 1883 1884 |
# File 'lib/flat_api/api/score_api.rb', line 1881 def post_score_comment(score, body, opts = {}) data, _status_code, _headers = post_score_comment_with_http_info(score, body, opts) data end |
#post_score_comment_with_http_info(score, body, opts = {}) ⇒ Array<(ScoreComment, Integer, Hash)>
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`.
1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 |
# File 'lib/flat_api/api/score_api.rb', line 1893 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ScoreComment' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.post_score_comment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) 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 = {}) ⇒ nil
Delete a collaborator Remove the specified collaborator from the score
1958 1959 1960 1961 |
# File 'lib/flat_api/api/score_api.rb', line 1958 def remove_score_collaborator(score, collaborator, opts = {}) remove_score_collaborator_with_http_info(score, collaborator, opts) nil end |
#remove_score_collaborator_with_http_info(score, collaborator, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a collaborator Remove the specified collaborator from the score
1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 |
# File 'lib/flat_api/api/score_api.rb', line 1970 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}', CGI.escape(score.to_s)).sub('{collaborator}', CGI.escape(collaborator.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'eventProperties'] = opts[:'event_properties'] if !opts[:'event_properties'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.remove_score_collaborator", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) 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 = {}) ⇒ nil
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.
2033 2034 2035 2036 |
# File 'lib/flat_api/api/score_api.rb', line 2033 def untrash_score(score, opts = {}) untrash_score_with_http_info(score, opts) nil end |
#untrash_score_with_http_info(score, opts = {}) ⇒ Array<(nil, Integer, Hash)>
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.
2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 |
# File 'lib/flat_api/api/score_api.rb', line 2043 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}', CGI.escape(score.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.untrash_score", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) 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 = {}) ⇒ ScoreComment
Update an existing comment
2098 2099 2100 2101 |
# File 'lib/flat_api/api/score_api.rb', line 2098 def update_score_comment(score, comment, body, opts = {}) data, _status_code, _headers = update_score_comment_with_http_info(score, comment, body, opts) data end |
#update_score_comment_with_http_info(score, comment, body, opts = {}) ⇒ Array<(ScoreComment, Integer, Hash)>
Update an existing comment
2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 |
# File 'lib/flat_api/api/score_api.rb', line 2110 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}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ScoreComment' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.update_score_comment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) 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 = {}) ⇒ ScoreTrack
Update an audio or video track linked to a score
2178 2179 2180 2181 |
# File 'lib/flat_api/api/score_api.rb', line 2178 def update_score_track(score, track, body, opts = {}) data, _status_code, _headers = update_score_track_with_http_info(score, track, body, opts) data end |
#update_score_track_with_http_info(score, track, body, opts = {}) ⇒ Array<(ScoreTrack, Integer, Hash)>
Update an audio or video track linked to a score
2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 |
# File 'lib/flat_api/api/score_api.rb', line 2189 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}', CGI.escape(score.to_s)).sub('{track}', CGI.escape(track.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ScoreTrack' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"ScoreApi.update_score_track", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) 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 |