Skip to content

Commit c683a17

Browse files
committed
feat(client): Update to API specification v2.3
1 parent 3852bab commit c683a17

32 files changed

+1490
-54
lines changed

.swagger-codegen/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.2.3-SNAPSHOT

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 0.4.0
4+
5+
* feat(user): Add profile theme and instruments played.
6+
* feat(edu): Add new cursor-based pagination for `GET /v2/organizations/users` and `GET /v2/organizations/invitations`.
7+
* feat(edu): Add new methods:
8+
* `PUT /v2/organizations/users/{user}`: Admin endpoint to update managed accounts.
9+
* `DELETE /v2/organizations/users/{user}`: Admin endpoint to delete or convert edu accounts to consumer accounts.
10+
* feat(edu): Classes have a new state `inactive` that can be activated using the new method `POST /v2/classes/{class}/activate`.
11+
* feat(edu): Assignments have a new state `draft` and can have a new attachment type `exercise`.
12+
* feat(edu): Return Canvas LMS Instance domain in classes details
13+
* feat(edu): Return Clever.com section information in classes details
14+
315
## 0.3.0
416

517
* feat(edu): Public release of the first education APIs:

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ All URIs are relative to *https://api.flat.io/v2*
7979
Class | Method | HTTP request | Description
8080
------------ | ------------- | ------------- | -------------
8181
*AccountApi* | [**get_authenticated_user**](docs/AccountApi.md#get_authenticated_user) | **GET** /me | Get current user profile
82+
*ClassApi* | [**activate_class**](docs/ClassApi.md#activate_class) | **POST** /classes/{class}/activate | Activate the class
8283
*ClassApi* | [**add_class_user**](docs/ClassApi.md#add_class_user) | **PUT** /classes/{class}/users/{user} | Add a user to the class
8384
*ClassApi* | [**archive_class**](docs/ClassApi.md#archive_class) | **POST** /classes/{class}/archive | Archive the class
8485
*ClassApi* | [**copy_assignment**](docs/ClassApi.md#copy_assignment) | **POST** /classes/{class}/assignments/{assignment}/copy | Copy an assignment
@@ -107,7 +108,9 @@ Class | Method | HTTP request | Description
107108
*OrganizationApi* | [**list_organization_invitations**](docs/OrganizationApi.md#list_organization_invitations) | **GET** /organizations/invitations | List the organization invitations
108109
*OrganizationApi* | [**list_organization_users**](docs/OrganizationApi.md#list_organization_users) | **GET** /organizations/users | List the organization users
109110
*OrganizationApi* | [**remove_organization_invitation**](docs/OrganizationApi.md#remove_organization_invitation) | **DELETE** /organizations/invitations/{invitation} | Remove an organization invitation
111+
*OrganizationApi* | [**remove_organization_user**](docs/OrganizationApi.md#remove_organization_user) | **DELETE** /organizations/users/{user} | Remove an account from Flat
110112
*OrganizationApi* | [**revoke_lti_credentials**](docs/OrganizationApi.md#revoke_lti_credentials) | **DELETE** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials
113+
*OrganizationApi* | [**update_organization_user**](docs/OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information
111114
*ScoreApi* | [**add_score_collaborator**](docs/ScoreApi.md#add_score_collaborator) | **POST** /scores/{score}/collaborators | Add a new collaborator
112115
*ScoreApi* | [**create_score**](docs/ScoreApi.md#create_score) | **POST** /scores | Create a new score
113116
*ScoreApi* | [**create_score_revision**](docs/ScoreApi.md#create_score_revision) | **POST** /scores/{score}/revisions | Create a new revision
@@ -147,12 +150,12 @@ Class | Method | HTTP request | Description
147150
- [ClassCreation](docs/ClassCreation.md)
148151
- [ClassDetails](docs/ClassDetails.md)
149152
- [ClassDetailsCanvas](docs/ClassDetailsCanvas.md)
153+
- [ClassDetailsClever](docs/ClassDetailsClever.md)
150154
- [ClassDetailsGoogleClassroom](docs/ClassDetailsGoogleClassroom.md)
151155
- [ClassDetailsGoogleDrive](docs/ClassDetailsGoogleDrive.md)
152156
- [ClassDetailsLti](docs/ClassDetailsLti.md)
153157
- [ClassRoles](docs/ClassRoles.md)
154158
- [ClassState](docs/ClassState.md)
155-
- [ClassStreamPostMode](docs/ClassStreamPostMode.md)
156159
- [ClassUpdate](docs/ClassUpdate.md)
157160
- [FlatErrorResponse](docs/FlatErrorResponse.md)
158161
- [FlatLocales](docs/FlatLocales.md)
@@ -181,7 +184,6 @@ Class | Method | HTTP request | Description
181184
- [ScoreCreation](docs/ScoreCreation.md)
182185
- [ScoreData](docs/ScoreData.md)
183186
- [ScoreDataEncoding](docs/ScoreDataEncoding.md)
184-
- [ScoreDetails](docs/ScoreDetails.md)
185187
- [ScoreFork](docs/ScoreFork.md)
186188
- [ScoreLikesCounts](docs/ScoreLikesCounts.md)
187189
- [ScoreModification](docs/ScoreModification.md)
@@ -193,13 +195,20 @@ Class | Method | HTTP request | Description
193195
- [ScoreSource](docs/ScoreSource.md)
194196
- [ScoreSummary](docs/ScoreSummary.md)
195197
- [ScoreViewsCounts](docs/ScoreViewsCounts.md)
198+
- [UserAdminUpdate](docs/UserAdminUpdate.md)
196199
- [UserBasics](docs/UserBasics.md)
197200
- [UserCreation](docs/UserCreation.md)
198-
- [UserDetails](docs/UserDetails.md)
199-
- [UserDetailsAdmin](docs/UserDetailsAdmin.md)
200201
- [UserDetailsAdminLicense](docs/UserDetailsAdminLicense.md)
201-
- [UserPublic](docs/UserPublic.md)
202+
- [UserInstruments](docs/UserInstruments.md)
203+
- [ScoreDetails](docs/ScoreDetails.md)
202204
- [UserPublicSummary](docs/UserPublicSummary.md)
205+
- [UserDetailsAdmin](docs/UserDetailsAdmin.md)
206+
- [UserPublic](docs/UserPublic.md)
207+
- [UserDetails](docs/UserDetails.md)
208+
209+
210+
## Documentation For Authorization
211+
203212

204213
## OAuth2
205214

@@ -226,3 +235,4 @@ Class | Method | HTTP request | Description
226235
## Author
227236

228237
developers@flat.io
238+

docs/ClassApi.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All URIs are relative to *https://api.flat.io/v2*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**activate_class**](ClassApi.md#activate_class) | **POST** /classes/{class}/activate | Activate the class
78
[**add_class_user**](ClassApi.md#add_class_user) | **PUT** /classes/{class}/users/{user} | Add a user to the class
89
[**archive_class**](ClassApi.md#archive_class) | **POST** /classes/{class}/archive | Archive the class
910
[**copy_assignment**](ClassApi.md#copy_assignment) | **POST** /classes/{class}/assignments/{assignment}/copy | Copy an assignment
@@ -24,6 +25,57 @@ Method | HTTP request | Description
2425
[**update_class**](ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class
2526

2627

28+
# **activate_class**
29+
> ClassDetails activate_class(_class)
30+
31+
Activate the class
32+
33+
Mark the class as `active`. This is mainly used for classes synchronized from Clever that are initially with an `inactive` state and hidden in the UI.
34+
35+
### Example
36+
```python
37+
from __future__ import print_function
38+
import time
39+
import flat_api
40+
from flat_api.rest import ApiException
41+
from pprint import pprint
42+
43+
# Configure OAuth2 access token for authorization: OAuth2
44+
flat_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
45+
46+
# create an instance of the API class
47+
api_instance = flat_api.ClassApi()
48+
_class = '_class_example' # str | Unique identifier of the class
49+
50+
try:
51+
# Activate the class
52+
api_response = api_instance.activate_class(_class)
53+
pprint(api_response)
54+
except ApiException as e:
55+
print("Exception when calling ClassApi->activate_class: %s\n" % e)
56+
```
57+
58+
### Parameters
59+
60+
Name | Type | Description | Notes
61+
------------- | ------------- | ------------- | -------------
62+
**_class** | **str**| Unique identifier of the class |
63+
64+
### Return type
65+
66+
[**ClassDetails**](ClassDetails.md)
67+
68+
### Authorization
69+
70+
[OAuth2](../README.md#OAuth2)
71+
72+
### HTTP request headers
73+
74+
- **Content-Type**: application/json
75+
- **Accept**: application/json
76+
77+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
78+
2779
# **add_class_user**
2880
> add_class_user(_class, user)
2981

docs/ClassDetails.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Name | Type | Description | Notes
2020
**google_drive** | [**ClassDetailsGoogleDrive**](ClassDetailsGoogleDrive.md) | | [optional]
2121
**lti** | [**ClassDetailsLti**](ClassDetailsLti.md) | | [optional]
2222
**canvas** | [**ClassDetailsCanvas**](ClassDetailsCanvas.md) | | [optional]
23+
**clever** | [**ClassDetailsClever**](ClassDetailsClever.md) | | [optional]
2324

2425
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2526

docs/ClassDetailsCanvas.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**id** | **str** | Unique identifier of the course on Canvas | [optional]
7+
**domain** | **str** | Canvas instance domain (e.g. \"canvas.instructure.com\") | [optional]
78

89
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
910

docs/ClassDetailsClever.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ClassDetailsClever
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **str** | Clever section unique identifier | [optional]
7+
**creation_date** | **datetime** | The creation date of the section on clever | [optional]
8+
**modification_date** | **datetime** | The last modification date of the section on clever | [optional]
9+
**subject** | **str** | Normalized subject of the course | [optional]
10+
**term_name** | **str** | Name of the term when this course happens | [optional]
11+
**term_start_date** | **datetime** | Beginning date of the term | [optional]
12+
**term_end_date** | **datetime** | End date of the term | [optional]
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+

docs/MediaAttachment.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
**type** | **str** | The type of the assignment resolved: * `rich`, `photo`, `video` are attachment types that are automatically resolved from a `link` attachment. * A `flat` attachment is a score document where the unique identifier will be specified in the `score` property. Its sharing mode will be provided in the `sharingMode` property. | [optional]
77
**score** | **str** | An unique Flat score identifier | [optional]
88
**revision** | **str** | An unique revision identifier of a score | [optional]
9+
**correct** | **bool** | If the attachment is an exercise question, this state will describe if it is correct or not.For exercise assignments only. | [optional]
910
**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional]
1011
**title** | **str** | The resolved title of the attachment | [optional]
1112
**description** | **str** | The resolved description of the attachment | [optional]

0 commit comments

Comments
 (0)