Skip to content

Commit 391455b

Browse files
committed
feat(client): Update to API specification v2.6
1 parent f0ef045 commit 391455b

File tree

227 files changed

+17918
-14445
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+17918
-14445
lines changed

.swagger-codegen/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.3-SNAPSHOT
1+
2.4.0-SNAPSHOT

CHANGELOG.md

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,59 @@
11
# Changelog
22

3-
## 0.5.0
3+
## 0.6.0 (API v2.6.0)
4+
5+
* feat(collections): Add new Collections API endpoints
6+
* `POST /collections`: Create new collection
7+
* `GET /collections`: List collections
8+
* `GET /collections/{collection}`: Get collection details
9+
* `PUT /collections/{collection}`: Update collection details
10+
* `DELETE /collections/{collection}`: Delete collection
11+
* `POST /collections/{collection}/untrash`: Untrash collection
12+
* `GET /collections/{collection}/scores`: List scores contained in a collection
13+
* `PUT /collections/{collection}/scores/{score}`: Add a score to a collection
14+
* `DELETE /collections/{collection}/scores/{score}`: Remove a score from a collection
15+
* feat(collections): Add new OAuth2 scopes for new features:
16+
* `collections.readonly`: Allow read-only access to a user's collections.
17+
* `collections.add_scores`: Allow to add scores to a user's collections.
18+
* `collections`: Full, permissive scope to access all of a user's collections.
19+
* feat(score): Added new method to untrash a score (`POST /v2/scores/{score}/untrash`)
20+
* feat(score): `DELETE /v2/scores/{score}` can now be used without admin rights. This new behavior will unshare the score from the current account.
21+
* feat(score): `POST /scores/{score}/fork` now accepts a collection identifier to copy a score to a specific collection.
22+
* feat(comments): Comments can now be filtered by type with the new query string `type` (`document` or `inline`).
23+
* update(openapi): Some schema definitions have been renamed, they are now used for Scores and Collections
24+
* `ScoreRights` -> `ResourceRights`
25+
* `ScoreCollaborator` -> `ResourceCollaborator`
26+
* `ScoreCollaboratorCreation` -> `ResourceCollaboratorCreation`
27+
* existing _score sharing key_ -> `ResourceSharingKey`
28+
* **DEPRECATED**: `GET /scores/{score}/revisions/{revision}/{format}` no longer support part indexes for single/set of parts exports, but our own part UUIDs.
29+
* **DEPRECATED** on 2019-01-01: `GET /users/{user}/scores` will no longer list private and shared scores, but only public scores of a Flat account.
30+
31+
### API v2.5.0 to v2.5.2
32+
33+
* feat(scores): Add video & audio tracks support for scores: `/v2/scores/{score}/tracks`.
34+
* fix(user): Add missing escape in `pattern` (`UserCreation.username`).
35+
* fix(score): missing ScoreRights.aclRead type
36+
37+
## 0.5.0 (API v2.4.0)
438

539
* feat(scores): New metadata and update of `PUT /v2/scores/{score}`:
640
* Added metadata in API `subtitle`, `lyricist`, `composer`, `description`, `tags`, `creationType`, `license`, `licenseText`, `durationTime`, `numberMeasures`, `mainTempoQpm`, `publicationDate`.
741
* `PUT /v2/scores/{score}`: Remove `title` property, this one can be updated by saving a new revision of the score data.
842
* `PUT /v2/scores/{score}`: New settable properties: `description`, `tags`, `creationType`, `license`.
943

10-
## 0.4.0
44+
## 0.4.0 (API v2.3.0)
1145

1246
* feat(user): Add profile theme and instruments played.
1347
* feat(edu): Add new cursor-based pagination for `GET /v2/organizations/users` and `GET /v2/organizations/invitations`.
1448
* feat(edu): Add new methods:
1549
* `PUT /v2/organizations/users/{user}`: Admin endpoint to update managed accounts.
16-
* `DELETE /v2/organizations/users/{user}`: Admin endpoint to delete or convert edu accounts to consumer accounts.
17-
* feat(edu): Classes have a new state `inactive` that can be activated using the new method `POST /v2/classes/{class}/activate`.
18-
* feat(edu): Assignments have a new state `draft` and can have a new attachment type `exercise`.
19-
* feat(edu): Return Canvas LMS Instance domain in classes details
20-
* feat(edu): Return Clever.com section information in classes details
50+
* `DELETE /v2/organizations/users/{user}`: Admin endpoint to delete or convert edu accounts to consumer accounts.
51+
* feat(edu): Classes have a new state `inactive` that can be activated using the new method `POST /v2/classes/{class}/activate`.
52+
* feat(edu): Assignments have a new state `draft` and can have a new attachment type `exercise`.
53+
* feat(edu): Return Canvas LMS Instance domain in classes details
54+
* feat(edu): Return Clever.com section information in classes details
2155

22-
## 0.3.0
56+
## 0.3.0 (API v2.2.0)
2357

2458
* feat(edu): Public release of the first education APIs:
2559
* `/v2/classes`: Classes management

README.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ Class | Method | HTTP request | Description
9898
*ClassApi* | [**list_classes**](docs/ClassApi.md#list_classes) | **GET** /classes | List the classes available for the current user
9999
*ClassApi* | [**unarchive_class**](docs/ClassApi.md#unarchive_class) | **DELETE** /classes/{class}/archive | Unarchive the class
100100
*ClassApi* | [**update_class**](docs/ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class
101+
*CollectionApi* | [**add_score_to_collection**](docs/CollectionApi.md#add_score_to_collection) | **PUT** /collections/{collection}/scores/{score} | Add a score to the collection
102+
*CollectionApi* | [**create_collection**](docs/CollectionApi.md#create_collection) | **POST** /collections | Create a new collection
103+
*CollectionApi* | [**delete_collection**](docs/CollectionApi.md#delete_collection) | **DELETE** /collections/{collection} | Delete the collection
104+
*CollectionApi* | [**delete_score_from_collection**](docs/CollectionApi.md#delete_score_from_collection) | **DELETE** /collections/{collection}/scores/{score} | Delete a score from the collection
105+
*CollectionApi* | [**edit_collection**](docs/CollectionApi.md#edit_collection) | **PUT** /collections/{collection} | Update a collection's metadata
106+
*CollectionApi* | [**get_collection**](docs/CollectionApi.md#get_collection) | **GET** /collections/{collection} | Get collection details
107+
*CollectionApi* | [**list_collection_scores**](docs/CollectionApi.md#list_collection_scores) | **GET** /collections/{collection}/scores | List the scores contained in a collection
108+
*CollectionApi* | [**list_collections**](docs/CollectionApi.md#list_collections) | **GET** /collections | List the collections
109+
*CollectionApi* | [**untrash_collection**](docs/CollectionApi.md#untrash_collection) | **POST** /collections/{collection}/untrash | Untrash a collection
101110
*GroupApi* | [**get_group_details**](docs/GroupApi.md#get_group_details) | **GET** /groups/{group} | Get group information
102111
*GroupApi* | [**get_group_scores**](docs/GroupApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores
103112
*GroupApi* | [**list_group_users**](docs/GroupApi.md#list_group_users) | **GET** /groups/{group}/users | List group's users
@@ -112,10 +121,12 @@ Class | Method | HTTP request | Description
112121
*OrganizationApi* | [**revoke_lti_credentials**](docs/OrganizationApi.md#revoke_lti_credentials) | **DELETE** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials
113122
*OrganizationApi* | [**update_organization_user**](docs/OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information
114123
*ScoreApi* | [**add_score_collaborator**](docs/ScoreApi.md#add_score_collaborator) | **POST** /scores/{score}/collaborators | Add a new collaborator
124+
*ScoreApi* | [**add_score_track**](docs/ScoreApi.md#add_score_track) | **POST** /scores/{score}/tracks | Add a new video or audio track to the score
115125
*ScoreApi* | [**create_score**](docs/ScoreApi.md#create_score) | **POST** /scores | Create a new score
116126
*ScoreApi* | [**create_score_revision**](docs/ScoreApi.md#create_score_revision) | **POST** /scores/{score}/revisions | Create a new revision
117127
*ScoreApi* | [**delete_score**](docs/ScoreApi.md#delete_score) | **DELETE** /scores/{score} | Delete a score
118128
*ScoreApi* | [**delete_score_comment**](docs/ScoreApi.md#delete_score_comment) | **DELETE** /scores/{score}/comments/{comment} | Delete a comment
129+
*ScoreApi* | [**delete_score_track**](docs/ScoreApi.md#delete_score_track) | **DELETE** /scores/{score}/tracks/{track} | Remove an audio or video track linked to the score
119130
*ScoreApi* | [**edit_score**](docs/ScoreApi.md#edit_score) | **PUT** /scores/{score} | Edit a score's metadata
120131
*ScoreApi* | [**fork_score**](docs/ScoreApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score
121132
*ScoreApi* | [**ger_user_likes**](docs/ScoreApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores
@@ -128,12 +139,16 @@ Class | Method | HTTP request | Description
128139
*ScoreApi* | [**get_score_revision_data**](docs/ScoreApi.md#get_score_revision_data) | **GET** /scores/{score}/revisions/{revision}/{format} | Get a score revision data
129140
*ScoreApi* | [**get_score_revisions**](docs/ScoreApi.md#get_score_revisions) | **GET** /scores/{score}/revisions | List the revisions
130141
*ScoreApi* | [**get_score_submissions**](docs/ScoreApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score
142+
*ScoreApi* | [**get_score_track**](docs/ScoreApi.md#get_score_track) | **GET** /scores/{score}/tracks/{track} | Retrieve the details of an audio or video track linked to a score
131143
*ScoreApi* | [**get_user_scores**](docs/ScoreApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores
144+
*ScoreApi* | [**list_score_tracks**](docs/ScoreApi.md#list_score_tracks) | **GET** /scores/{score}/tracks | List the audio or video tracks linked to a score
132145
*ScoreApi* | [**mark_score_comment_resolved**](docs/ScoreApi.md#mark_score_comment_resolved) | **PUT** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved
133146
*ScoreApi* | [**mark_score_comment_unresolved**](docs/ScoreApi.md#mark_score_comment_unresolved) | **DELETE** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved
134147
*ScoreApi* | [**post_score_comment**](docs/ScoreApi.md#post_score_comment) | **POST** /scores/{score}/comments | Post a new comment
135148
*ScoreApi* | [**remove_score_collaborator**](docs/ScoreApi.md#remove_score_collaborator) | **DELETE** /scores/{score}/collaborators/{collaborator} | Delete a collaborator
149+
*ScoreApi* | [**untrash_score**](docs/ScoreApi.md#untrash_score) | **POST** /scores/{score}/untrash | Untrash a score
136150
*ScoreApi* | [**update_score_comment**](docs/ScoreApi.md#update_score_comment) | **PUT** /scores/{score}/comments/{comment} | Update an existing comment
151+
*ScoreApi* | [**update_score_track**](docs/ScoreApi.md#update_score_track) | **PUT** /scores/{score}/tracks/{track} | Update an audio or video track linked to a score
137152
*UserApi* | [**ger_user_likes**](docs/UserApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores
138153
*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **GET** /users/{user} | Get a public user profile
139154
*UserApi* | [**get_user_scores**](docs/UserApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores
@@ -157,6 +172,13 @@ Class | Method | HTTP request | Description
157172
- [ClassRoles](docs/ClassRoles.md)
158173
- [ClassState](docs/ClassState.md)
159174
- [ClassUpdate](docs/ClassUpdate.md)
175+
- [Collection](docs/Collection.md)
176+
- [CollectionCapabilities](docs/CollectionCapabilities.md)
177+
- [CollectionCreation](docs/CollectionCreation.md)
178+
- [CollectionModification](docs/CollectionModification.md)
179+
- [CollectionPrivacy](docs/CollectionPrivacy.md)
180+
- [CollectionTitle](docs/CollectionTitle.md)
181+
- [CollectionType](docs/CollectionType.md)
160182
- [FlatErrorResponse](docs/FlatErrorResponse.md)
161183
- [FlatLocales](docs/FlatLocales.md)
162184
- [GoogleClassroomCoursework](docs/GoogleClassroomCoursework.md)
@@ -174,8 +196,9 @@ Class | Method | HTTP request | Description
174196
- [OrganizationInvitation](docs/OrganizationInvitation.md)
175197
- [OrganizationInvitationCreation](docs/OrganizationInvitationCreation.md)
176198
- [OrganizationRoles](docs/OrganizationRoles.md)
177-
- [ScoreCollaborator](docs/ScoreCollaborator.md)
178-
- [ScoreCollaboratorCreation](docs/ScoreCollaboratorCreation.md)
199+
- [ResourceCollaboratorCreation](docs/ResourceCollaboratorCreation.md)
200+
- [ResourceRights](docs/ResourceRights.md)
201+
- [ResourceSharingKey](docs/ResourceSharingKey.md)
179202
- [ScoreComment](docs/ScoreComment.md)
180203
- [ScoreCommentContext](docs/ScoreCommentContext.md)
181204
- [ScoreCommentCreation](docs/ScoreCommentCreation.md)
@@ -193,15 +216,21 @@ Class | Method | HTTP request | Description
193216
- [ScoreRevision](docs/ScoreRevision.md)
194217
- [ScoreRevisionCreation](docs/ScoreRevisionCreation.md)
195218
- [ScoreRevisionStatistics](docs/ScoreRevisionStatistics.md)
196-
- [ScoreRights](docs/ScoreRights.md)
197219
- [ScoreSource](docs/ScoreSource.md)
198220
- [ScoreSummary](docs/ScoreSummary.md)
221+
- [ScoreTrack](docs/ScoreTrack.md)
222+
- [ScoreTrackCreation](docs/ScoreTrackCreation.md)
223+
- [ScoreTrackPoint](docs/ScoreTrackPoint.md)
224+
- [ScoreTrackState](docs/ScoreTrackState.md)
225+
- [ScoreTrackType](docs/ScoreTrackType.md)
226+
- [ScoreTrackUpdate](docs/ScoreTrackUpdate.md)
199227
- [ScoreViewsCounts](docs/ScoreViewsCounts.md)
200228
- [UserAdminUpdate](docs/UserAdminUpdate.md)
201229
- [UserBasics](docs/UserBasics.md)
202230
- [UserCreation](docs/UserCreation.md)
203231
- [UserDetailsAdminLicense](docs/UserDetailsAdminLicense.md)
204232
- [UserInstruments](docs/UserInstruments.md)
233+
- [ResourceCollaborator](docs/ResourceCollaborator.md)
205234
- [ScoreDetails](docs/ScoreDetails.md)
206235
- [UserPublicSummary](docs/UserPublicSummary.md)
207236
- [UserDetailsAdmin](docs/UserDetailsAdmin.md)
@@ -217,12 +246,15 @@ Class | Method | HTTP request | Description
217246
- **Type**: OAuth
218247
- **Flow**: accessCode
219248
- **Authorization URL**: https://flat.io/auth/oauth
220-
- **Scopes**:
221-
- **account.public_profile**: Provides access to the basic person's public profile. Education profiles may be anonymized with this scope, you can request the scope `education_profile` to access to the a basic education account profile.
222-
- **account.education_profile**: Provides access to the basic person's education profile and public organization information.
223-
- **scores.readonly**: Allows read-only access to all a user's scores. You won't need this scope to read public scores.
224-
- **scores.social**: Allow to post comments and like scores
225-
- **scores**: Full, permissive scope to access all of a user's scores.
249+
- **Scopes**:
250+
- **account.public_profile**: Provides access to the basic person's public profile. Education profiles may be anonymized with this scope, you can request the scope `education_profile` to access to the a basic education account profile.
251+
- **account.education_profile**: Provides access to the basic person's education profile and public organization information.
252+
- **scores.readonly**: Allows read-only access to all a user's scores. You won't need this scope to read public scores.
253+
- **scores.social**: Allow to post comments and like scores
254+
- **scores**: Full, permissive scope to access all of a user's scores.
255+
- **collections.readonly**: Allow read-only access to a user's collections.
256+
- **collections.add_scores**: Allow to add scores to a user's collections.
257+
- **collections**: Full, permissive scope to access all of a user's collections.
226258
- **edu.classes**: Full, permissive scope to manage the classes.
227259
- **edu.classes.readonly**: Read-only access to the classes.
228260
- **edu.assignments**: Read-write access to the assignments and submissions.

docs/AccountApi.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Get current user profile
1414

1515
Get details about the current authenticated User.
1616

17-
### Example
17+
### Example
1818
```python
1919
from __future__ import print_function
2020
import time
@@ -23,12 +23,13 @@ from flat_api.rest import ApiException
2323
from pprint import pprint
2424

2525
# Configure OAuth2 access token for authorization: OAuth2
26-
flat_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
26+
configuration = flat_api.Configuration()
27+
configuration.access_token = 'YOUR_ACCESS_TOKEN'
2728

2829
# create an instance of the API class
29-
api_instance = flat_api.AccountApi()
30+
api_instance = flat_api.AccountApi(flat_api.ApiClient(configuration))
3031

31-
try:
32+
try:
3233
# Get current user profile
3334
api_response = api_instance.get_authenticated_user()
3435
pprint(api_response)

0 commit comments

Comments
 (0)