All URIs are relative to https://api.flat.io/v2
Method | HTTP request | Description |
---|---|---|
addScoreCollaborator | POST /scores/{score}/collaborators | Add a new collaborator |
addScoreTrack | POST /scores/{score}/tracks | Add a new video or audio track to the score |
createScore | POST /scores | Create a new score |
createScoreRevision | POST /scores/{score}/revisions | Create a new revision |
deleteScore | DELETE /scores/{score} | Delete a score |
deleteScoreComment | DELETE /scores/{score}/comments/{comment} | Delete a comment |
deleteScoreTrack | DELETE /scores/{score}/tracks/{track} | Remove an audio or video track linked to the score |
editScore | PUT /scores/{score} | Edit a score's metadata |
forkScore | POST /scores/{score}/fork | Fork a score |
gerUserLikes | GET /users/{user}/likes | List liked scores |
getGroupScores | GET /groups/{group}/scores | List group's scores |
getScore | GET /scores/{score} | Get a score's metadata |
getScoreCollaborator | GET /scores/{score}/collaborators/{collaborator} | Get a collaborator |
getScoreCollaborators | GET /scores/{score}/collaborators | List the collaborators |
getScoreComments | GET /scores/{score}/comments | List comments |
getScoreRevision | GET /scores/{score}/revisions/{revision} | Get a score revision |
getScoreRevisionData | GET /scores/{score}/revisions/{revision}/{format} | Get a score revision data |
getScoreRevisions | GET /scores/{score}/revisions | List the revisions |
getScoreSubmissions | GET /scores/{score}/submissions | List submissions related to the score |
getScoreTrack | GET /scores/{score}/tracks/{track} | Retrieve the details of an audio or video track linked to a score |
getUserScores | GET /users/{user}/scores | List user's scores |
listScoreTracks | GET /scores/{score}/tracks | List the audio or video tracks linked to a score |
markScoreCommentResolved | PUT /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved |
markScoreCommentUnresolved | DELETE /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved |
postScoreComment | POST /scores/{score}/comments | Post a new comment |
removeScoreCollaborator | DELETE /scores/{score}/collaborators/{collaborator} | Delete a collaborator |
untrashScore | POST /scores/{score}/untrash | Untrash a score |
updateScoreComment | PUT /scores/{score}/comments/{comment} | Update an existing comment |
updateScoreTrack | PUT /scores/{score}/tracks/{track} | Update an audio or video track linked to a score |
\Flat\APIClient\Model\ResourceCollaborator addScoreCollaborator($score, $body)
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$body = new \Flat\APIClient\Model\ResourceCollaboratorCreation(); // \Flat\APIClient\Model\ResourceCollaboratorCreation |
try {
$result = $apiInstance->addScoreCollaborator($score, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->addScoreCollaborator: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
body | \Flat\APIClient\Model\ResourceCollaboratorCreation |
\Flat\APIClient\Model\ResourceCollaborator
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreTrack addScoreTrack($score, $body)
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$body = new \Flat\APIClient\Model\ScoreTrackCreation(); // \Flat\APIClient\Model\ScoreTrackCreation |
try {
$result = $apiInstance->addScoreTrack($score, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->addScoreTrack: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
body | \Flat\APIClient\Model\ScoreTrackCreation |
\Flat\APIClient\Model\ScoreTrack
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreDetails createScore($body)
Create a new score
Use this API method to create a new music score in the current User account. You will need a MusicXML 3 (vnd.recordare.musicxml
or vnd.recordare.musicxml+xml
) or a MIDI (audio/midi
) file to create the new Flat document. This API call will automatically create the first revision of the document, the score can be modified by the using our web application or by uploading a new revision of this file (POST /v2/scores/{score}/revisions/{revision}
). The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups). If no collection
is specified, the API will create the score in the most appropriate collection. This can be the root
collection or a different collection based on the user's settings or API authentication method. If a collection
is specified and this one has more public privacy settings than the score (e.g. public
vs private
for the score), the privacy settings of the created score will be adjusted to the collection ones. You can check the adjusted privacy settings in the returned score privacy
, and optionally adjust these settings if needed using PUT /scores/{score}
.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Flat\APIClient\Model\ScoreCreation(); // \Flat\APIClient\Model\ScoreCreation |
try {
$result = $apiInstance->createScore($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->createScore: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Flat\APIClient\Model\ScoreCreation |
\Flat\APIClient\Model\ScoreDetails
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreRevision createScoreRevision($score, $body)
Create a new revision
Update a score by uploading a new revision for this one.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$body = new \Flat\APIClient\Model\ScoreRevisionCreation(); // \Flat\APIClient\Model\ScoreRevisionCreation |
try {
$result = $apiInstance->createScoreRevision($score, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->createScoreRevision: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
body | \Flat\APIClient\Model\ScoreRevisionCreation |
\Flat\APIClient\Model\ScoreRevision
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteScore($score)
Delete a score
This method can be used by the owner/admin (aclAdmin
rights) of a score as well as regular collaborators. When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won't be accessible anymore after calling this method and the user's quota will directly be updated. When called by a regular collaborator (aclRead
/ aclWrite
), the score will be unshared (i.e. removed from the account & own collections).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
try {
$apiInstance->deleteScore($score);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->deleteScore: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteScoreComment($score, $comment, $sharingKey)
Delete a comment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$comment = "comment_example"; // string | Unique identifier of a sheet music comment
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$apiInstance->deleteScoreComment($score, $comment, $sharingKey);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->deleteScoreComment: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
comment | string | Unique identifier of a sheet music comment | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteScoreTrack($score, $track)
Remove an audio or video track linked to the score
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$track = "track_example"; // string | Unique identifier of a score audio track
try {
$apiInstance->deleteScoreTrack($score, $track);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->deleteScoreTrack: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
track | string | Unique identifier of a score audio track |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreDetails editScore($score, $body)
Edit a score's metadata
This API method allows you to change the metadata of a score document (e.g. its title
or privacy
), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (POST /v2/scores/{score}/revisions/{revision}
). When editing the title
of the score, the API metadata are updated directly when calling this method, unlike the data itself. The title in the score data will be "lazy" updated at the next score save with the editor or our internal save.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$body = new \Flat\APIClient\Model\ScoreModification(); // \Flat\APIClient\Model\ScoreModification |
try {
$result = $apiInstance->editScore($score, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->editScore: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
body | \Flat\APIClient\Model\ScoreModification | [optional] |
\Flat\APIClient\Model\ScoreDetails
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreDetails forkScore($score, $body, $sharingKey)
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$body = new \Flat\APIClient\Model\ScoreFork(); // \Flat\APIClient\Model\ScoreFork |
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->forkScore($score, $body, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->forkScore: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
body | \Flat\APIClient\Model\ScoreFork | ||
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ScoreDetails
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreDetails[] gerUserLikes($user, $ids)
List liked scores
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$user = "user_example"; // string | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
$ids = true; // bool | Return only the identifiers of the scores
try {
$result = $apiInstance->gerUserLikes($user, $ids);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->gerUserLikes: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
user | string | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | |
ids | bool | Return only the identifiers of the scores | [optional] |
\Flat\APIClient\Model\ScoreDetails[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreDetails[] getGroupScores($group, $parent)
List group's scores
Get the list of scores shared with a group.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$group = "group_example"; // string | Unique identifier of a Flat group
$parent = "parent_example"; // string | Filter the score forked from the score id `parent`
try {
$result = $apiInstance->getGroupScores($group, $parent);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getGroupScores: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
group | string | Unique identifier of a Flat group | |
parent | string | Filter the score forked from the score id `parent` | [optional] |
\Flat\APIClient\Model\ScoreDetails[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreDetails getScore($score, $sharingKey)
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->getScore($score, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getScore: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ScoreDetails
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ResourceCollaborator getScoreCollaborator($score, $collaborator, $sharingKey)
Get a collaborator
Get the information about a collaborator (User or Group).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$collaborator = "collaborator_example"; // string | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->getScoreCollaborator($score, $collaborator, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getScoreCollaborator: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
collaborator | string | Unique identifier of a collaborator permission, or unique identifier of a User, or unique identifier of a Group | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ResourceCollaborator
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ResourceCollaborator[] getScoreCollaborators($score, $sharingKey)
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).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->getScoreCollaborators($score, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getScoreCollaborators: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ResourceCollaborator[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreComment[] getScoreComments($score, $sharingKey, $type, $sort, $direction)
List comments
This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
$type = "type_example"; // string | Filter the comments by type
$sort = "sort_example"; // string | Sort
$direction = "direction_example"; // string | Sort direction
try {
$result = $apiInstance->getScoreComments($score, $sharingKey, $type, $sort, $direction);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getScoreComments: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
type | string | Filter the comments by type | [optional] |
sort | string | Sort | [optional] |
direction | string | Sort direction | [optional] |
\Flat\APIClient\Model\ScoreComment[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreRevision getScoreRevision($score, $revision, $sharingKey)
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$revision = "revision_example"; // string | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->getScoreRevision($score, $revision, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getScoreRevision: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
revision | string | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ScoreRevision
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string getScoreRevisionData($score, $revision, $format, $sharingKey, $parts, $onlyCached)
Get a score revision data
Retrieve the file corresponding to a score revision (the following formats are available: Flat JSON/Adagio JSON json
, MusicXML mxl
/xml
, MP3 mp3
, WAV wav
, MIDI midi
, or a tumbnail of the first page thumbnail.png
).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$revision = "revision_example"; // string | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
$format = "format_example"; // string | The format of the file you will retrieve
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
$parts = "parts_example"; // string | An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example \"1,2,5\".
$onlyCached = true; // bool | Only return files already generated and cached in Flat's production cache. If the file is not availabe, a 404 will be returned
try {
$result = $apiInstance->getScoreRevisionData($score, $revision, $format, $sharingKey, $parts, $onlyCached);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getScoreRevisionData: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
revision | string | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | |
format | string | The format of the file you will retrieve | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
parts | string | An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example "1,2,5". | [optional] |
onlyCached | bool | Only return files already generated and cached in Flat's production cache. If the file is not availabe, a 404 will be returned | [optional] |
string
- Content-Type: application/json
- Accept: application/json, application/vnd.recordare.musicxml+xml, application/vnd.recordare.musicxml, audio/mp3, audio/wav, audio/midi, image/png
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreRevision[] getScoreRevisions($score, $sharingKey)
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->getScoreRevisions($score, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getScoreRevisions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ScoreRevision[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\AssignmentSubmission[] getScoreSubmissions($score)
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
try {
$result = $apiInstance->getScoreSubmissions($score);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getScoreSubmissions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). |
\Flat\APIClient\Model\AssignmentSubmission[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreTrack getScoreTrack($score, $track, $sharingKey)
Retrieve the details of an audio or video track linked to a score
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$track = "track_example"; // string | Unique identifier of a score audio track
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->getScoreTrack($score, $track, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getScoreTrack: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
track | string | Unique identifier of a score audio track | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ScoreTrack
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreDetails[] getUserScores($user, $parent)
List user's scores
Get the list of public scores owned by a User. DEPRECATED: Please note that the current behavior will be deprecrated on 2019-01-01. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the Collections API instead.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$user = "user_example"; // string | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
$parent = "parent_example"; // string | Filter the score forked from the score id `parent`
try {
$result = $apiInstance->getUserScores($user, $parent);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->getUserScores: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
user | string | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | |
parent | string | Filter the score forked from the score id `parent` | [optional] |
\Flat\APIClient\Model\ScoreDetails[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreTrack[] listScoreTracks($score, $sharingKey)
List the audio or video tracks linked to a score
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->listScoreTracks($score, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->listScoreTracks: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ScoreTrack[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
markScoreCommentResolved($score, $comment, $sharingKey)
Mark the comment as resolved
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$comment = "comment_example"; // string | Unique identifier of a sheet music comment
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$apiInstance->markScoreCommentResolved($score, $comment, $sharingKey);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->markScoreCommentResolved: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
comment | string | Unique identifier of a sheet music comment | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
markScoreCommentUnresolved($score, $comment, $sharingKey)
Mark the comment as unresolved
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$comment = "comment_example"; // string | Unique identifier of a sheet music comment
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$apiInstance->markScoreCommentUnresolved($score, $comment, $sharingKey);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->markScoreCommentUnresolved: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
comment | string | Unique identifier of a sheet music comment | |
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreComment postScoreComment($score, $body, $sharingKey)
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
.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$body = new \Flat\APIClient\Model\ScoreCommentCreation(); // \Flat\APIClient\Model\ScoreCommentCreation |
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->postScoreComment($score, $body, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->postScoreComment: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
body | \Flat\APIClient\Model\ScoreCommentCreation | ||
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ScoreComment
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
removeScoreCollaborator($score, $collaborator)
Delete a collaborator
Remove the specified collaborator from the score
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$collaborator = "collaborator_example"; // string | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
try {
$apiInstance->removeScoreCollaborator($score, $collaborator);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->removeScoreCollaborator: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
collaborator | string | Unique identifier of a collaborator permission, or unique identifier of a User, or unique identifier of a Group |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
untrashScore($score)
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
try {
$apiInstance->untrashScore($score);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->untrashScore: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreComment updateScoreComment($score, $comment, $body, $sharingKey)
Update an existing comment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$comment = "comment_example"; // string | Unique identifier of a sheet music comment
$body = new \Flat\APIClient\Model\ScoreCommentUpdate(); // \Flat\APIClient\Model\ScoreCommentUpdate |
$sharingKey = "sharingKey_example"; // string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
try {
$result = $apiInstance->updateScoreComment($score, $comment, $body, $sharingKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->updateScoreComment: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
comment | string | Unique identifier of a sheet music comment | |
body | \Flat\APIClient\Model\ScoreCommentUpdate | ||
sharingKey | string | This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document. | [optional] |
\Flat\APIClient\Model\ScoreComment
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flat\APIClient\Model\ScoreTrack updateScoreTrack($score, $track, $body)
Update an audio or video track linked to a score
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Flat\APIClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Flat\APIClient\Api\ScoreApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$score = "score_example"; // string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
$track = "track_example"; // string | Unique identifier of a score audio track
$body = new \Flat\APIClient\Model\ScoreTrackUpdate(); // \Flat\APIClient\Model\ScoreTrackUpdate |
try {
$result = $apiInstance->updateScoreTrack($score, $track, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScoreApi->updateScoreTrack: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
score | string | Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). | |
track | string | Unique identifier of a score audio track | |
body | \Flat\APIClient\Model\ScoreTrackUpdate |
\Flat\APIClient\Model\ScoreTrack
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]